Command Prompt
Access the Mac command line by starting Command Prompt, which you can find in the start menu. Sometimes you'll need to run the command prompt as an administrator - such as when installing programs or packages. To do this, right-click on the Command Prompt icon in your start menu and select Run as Administrator.
Prompt
When you first open the command prompt, you might see something like:
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\alice>_
This is called the prompt. You'll see a blinking vertical line, called the cursor. This shows where the characters you type will appear, and also let you know the prompt is ready to receive input (if a program is running, you won't see it).
The prompt also gives you some useful information. Here, we can see that we're in the c:\Users\Alice
directory, which is our home directory.
Have a look at your command prompt now and see if you can extract these details from your own prompt.
At the prompt, you type (or paste in) a command which runs when you press ENTER.
Running programs, specifying options
Normally at the terminal you run programs or scripts which do something for you. For example, to count the number of words in a file. Because programs often need some kind of input (such as a name of a file or directory to process) we have to provide parameters (or arguments or options).
It's typical that this essential parameter - the thing you want the program to work with - is typed after the name of the program. So to use the program type
to list the contents 'essay.txt', we could try something like the following:
C:\Users\alice> type essay.txt
My essay
Rather than telling a program what data to process, we sometimes want to tell it how to process data, or how to do what it is supposed to do. These are usually specified as parameters (or arguments or options), which are passed to the program.
You can usually find out what options are available using the program's inbuilt help /?
:
tasklist /?
The documentation will describe the program's parameters and give some examples of usage.