The command-line interface, sometimes referred to as the CLI, is a tool into which you can type text commands to perform specific tasks—in contrast to the mouse's pointing and clicking on menus and buttons. Since you can directly control the computer by typing, many tasks can be performed more quickly, and some tasks can be automated with special commands that loop through and perform the same action on many files—saving you, potentially, loads of time in the process.

The most common these days is the Bash shell, which is the default on Linux and Mac systems in the Terminal application.

1. pwd

You can use the pwd command to find out your current location in the filesystem/name of the folder currently open in your terminal window.

Screenshot 2021-09-05 at 7.53.22 PM.png

2. ls

The ls command is used to list all the folders/files under the location specified, or if not specified, under the current location.

ls 

Screenshot 2021-09-05 at 7.35.17 PM.png

2. Change between files

The cd command stands for 'change directory'. This allows you to change your current location (current directory) to another directory.

You use the cd command alongside the other file/directory name you want to change to.

cd <filename>

Screenshot 2021-09-05 at 7.37.12 PM.png

3. To move up one directory

The cd .. command is used to move up one directory.

cd ..