Command Shift

The Command Line

Several of the steps in this section will be done by entering commands (instructions for your computer's operating system) into the command line (aka terminal). We can use the command line to tell our operating system to do all sorts of things, including installing software and modifying files.

To access it:

  • In macOS, open up Spotlight (cmd + space) and search for "terminal".

  • In Ubuntu, click Menu > Accessories > Terminal

Running Commands

To run a command, type it into the command line, then press Enter. Here's a simple command for you to try:

  • Run: echo hello there! (This means type "echo hello there!" into the terminal, then press Enter)

You should see the following:

  1. The words hello there! will appear in the terminal
  2. A new command prompt should appear, indicating that the command has finished running.

Command Line Quirks

  • When you enter a command into the command line and run it, you'll often see a message appear in response. The command you type in is called the input. The message that appears in response to your command is called the output.

  • However, some commands don't return an output. This can be confusing as it can give the impression that nothing has happened, but as long as a new command prompt appears you can assume that the command has run successfully. Sometimes this takes a little while.

  • Sometimes the terminal will ask you for a password. When you type it in, no characters will appear. This is a normal feature intended to keep your password safe. Even though you can't see the characters you type appearing on the screen, they are being entered! Type your password as normal then hit enter.

Some of the commands we provide in this section may not make sense to you right now, but don't worry - we'll provide explanations for what they do, and we'll take a closer look at how they're written in the command line interface section of this course.

Errors (are okay!)

While working through this section and executing the commands we provide, it’s important that you’re on the lookout for terminal errors. If you see something that doesn’t look quite right, let us know as soon as possible so that we can give you a hand. It's normal for errors to appear at this point, so don't worry if some things don't go as expected!

Errors vary from program to program. Below are some examples you may encounter:

command not found

not a git repo

404 curl

If you would prefer a video showing you how to set up your environment then the below should help if you're using Ubuntu. https://youtu.be/uqIl_4mRQUU

On this page