There are many commands you can use in the terminal to move through the filesystem of your computer and projects.
Command | Result |
---|---|
ls |
Lists all files and folders in the current directory. |
cd <new-directory> |
cd stands for change directory. Navigates from the current directory to new-directory . |
pwd |
Print working directory. Prints the path of the current directory. |
mkdir <new-folder> |
Make directory. Creates new-folder inside the current directory. |
touch <new-file> |
Creates a file called new-file in the current directory. |
rm <old-file> |
Removes old-file from the current directory. |
man <command> |
Manual. Prints to the screen the manual pages for the command . This includes the proper syntax and a description of how that command works. |
clear |
Empties the terminal window of previous commands and output. |
cp <source-path> <target-path> |
Copies the file or directory at source-path and puts it in the target-path . |
mv <source-path> <target-path> |
Moves the file or directory at source-path from its current location to target-path . |
Note
rm
will permanently remove items from the computer and cannot be undone.man
. Instead, <command> --help
provides 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.
Question
What line in a CLI indicates that the terminal is ready?
Question
Which shortcut takes you to the parent directory?
.
~
..