pwd Print Working DirectoryThe shell command pwd displays the file path from the root directory to the current working directory.
$ pwd/Users/sonny/Downloads
mkdir Make DirectoryThe shell command mkdir is used to make a new directory in the filesystem according to its argument. If a file path is given, the new directory will be placed at the end. Otherwise, it will create a new directory in the current working directory.
$ mkdir new-directory$ lsold-directory new-directory
ls ListThe shell command ls is used to list the contents of a directory. If no arguments are given, it will list the contents of the current working directory.
$ ls Desktopresume.pdfphoto.png
cd Change DirectoryThe shell command cd is used to move throughout the filesystem of a computer. It accepts a variety of arguments:
.. the parent of the current directory.$ cd some-directory$ cd ..
A computer’s filesystem organizes the data stored by a computer, so that it can be easily retrieved by the user.
Files are generally represented in a tree-like structure, in which any parent directory can have any number of children. The root directory is then found at the base of the tree.
touch Create New FileThe shell command touch creates a new file in the current working directory with the name provided.
$ touch grocery-list.txt
The command line allows a user to navigate the filesystem and run built-in programs or custom scripts. In Unix, the command line interface is called Bash, and the shell prompt is the $.
$
Helper commands for the command line include:
clear to clear the terminal