command-line

Session on the command line, a means of interacting with your computer programmatically through text.

View the Project on GitHub dhsouthbend/command-line

«< Previous Next »>

Getting to the command line

Mac OS

If you’re using Mac OS:

1. Click the Spotlight Search button (the magnifying glass) in the top right of your desktop.
2. Type “terminal” into the bar that appears.
3. Select the first item that appears in the list.
4. The terminal will look like this:

Terminal in Mac OS

When you see the $, you’re in the right place. We call the $ the command prompt; the $ lets us know the computer is ready to receive a command.

You can change the color of your Terminal or BashShell background and text by selecting Shell from the top menu bar, then selecting a theme from the menu under New Window.

Bonus points: if you really want to get the groove of just typing instead of pointing and clicking, you can press “Command (⌘)” and the space bar at the same time to pull up Spotlight search, start typing “Terminal,” and then hit “Enter” to open a terminal window. This will pull up a terminal window without touching your mousepad. For super bonus points, try to navigate like this for the next fifteen minutes, or even the rest of this session–it is tricky and sometimes a bit tiring when you start, but you can really pick up speed when you practice!

Windows

We won’t be using Windows’s own non-UNIX version of the command line. We installed Git Bash, following these instructions, so that we can work in the cross-platform Unix command line for this session.

1. Look for Git Bash in your programs menu and open.
2. If you can’t find the git folder, just type “git bash” in the search box and select “git bash” when it appears.
3. Open the program.
4. You know you’re in the right place when you see the $.

Command prompt $

$, which we will refer to as the “command prompt,” is the place you type commands you wish the computer to execute. We will now learn some of the most common commands.

In the next section, we’ll learn how to navigate the filesystem in the command line.

«< Previous Next »>