Make a directory.
mkdir [option] directory-list
The mkdir utility creates one or more directories.
The directory-list contains one or more pathnames of directories that mkdir creates.
||parent If the parent directory of the directory you are creating does not already exist, it will be created by mkdir if you use the -p option.|
You must have permission to write to and to search (execute permission) the parent directory of the directory you are creating. The mkdir utility creates directories that contain the standard invisible entries . and (representing the directory itself) and .. (representing the parent directory).
The following command creates a directory named accounts as a subdirectory of the working directory, and a directory named prospective as a subdirectory of accounts.
z123456@turing:~$ mkdir -p accounts/prospective
Below, without changing working directories, the same user creates another subdirectory within the accounts directory.
z123456@turing:~$ mkdir accounts/existing
Finally, the user changes the working directory to the accounts directory and creates one more subdirectory.
z123456@turing:~$ cd accounts z123456@turing:~/accounts$ mkdir closed