Tutorial: Working in the Terminal

Tutorial: Working in the Terminal#

You may have already noticed you’re not able to navigate the terminal using your mouse or cursor. We can navigate the terminal using the keyboard. The up and down arrow keys let you move back (up) and forward (down) through previously typed commands. The left and right arrow keys let you move within characters or symbols for a specific command.

Press the up arrow once to show the previously-typed echo command. Then, use the left and right arrow keys to navigate to the characters within the quotation marks and replace them with another word or phrase of your choosing. Press Return or Enter to run the modified command.

A couple other useful navigation tools:

  • Press Control + A to move to the start of a line

  • Press Control + E to move to the end of a line

  • Type clear into the terminal and press Return/Enter to clear the screen

  • When you’re ready to close the terminal window, type exit and press Return/Enter

Terminal syntax

A couple notes on terminal syntax:

  • commands tell the computer to perform an action

  • options modify the command and use a hyphen (-) symbol

    • Sometimes options are called flags or switches

  • arguments specify what the command operation will be performed on (i.e. a specific file or directory)

Not all commands require arguments or options, but some commands can have one or more of each. You can also chain multiple commands together using the vertical bar | symbol. This is often called a pipe.

Key Concepts#