How to Do Stuff in the Terminal
Navigating the Terminal Window
Moving from a GUI to a CLI can be difficult when we are so used to dragging our files from one folder to another. One of the difficulties is simply figuring out where we are in the filesystem! Here are some key indicators that the terminal gives us to show where we are:
This line is called the prompt. The prompt lets us know that the terminal
is ready to accept commands.
LaunchCode-Super-Computer is the name of the
~ tells us we are currently in the Home directory. The Home
directory is the folder that contains everything in the computer.
lcstaffmember is the username of the person who has logged onto the
terminal. We will be typing all of our commands after the
As we navigate through our filesystem, the terminal will rarely output a line
to let us know that the change has occurred. We have to keep our eye out on our
prompt as we enter our commands. The name of the computer and the username will
not change, however, the space where the
~ is, will. That indicates our
There are many commands you can use in the terminal to move through the filesystem of your computer and projects.
|Lists all files and folders in the current directory.|
|Print working directory. Prints the path of the current directory.|
|Make directory. Creates |
|Creates a file called |
|Manual. Prints to the screen the manual pages for the |
|Empties the terminal window of previous commands and output.|
|Copies the file or directory at |
|Moves the file or directory at |
rmwill permanently remove items from the computer and cannot be undone.
- Git bash does not support
<command> --helpprovides a scaled down alternative.
Beyond these basic commands, there are some shortcuts if you don’t want to type out the full name of a directory or simply can’t remember it.
|Shortcut||Where it goes|
|The Home directory|
|The current directory|
|The parent directory of the current directory|
For an in-depth tutorial of how to use a CLI to move through your daily life, refer to the terminal commands tutorial .
Check Your Understanding
What line in a CLI indicates that the terminal is ready to accept commands?
- There isn’t a line that does that.
Which shortcut takes you to the parent directory?