How to Make a Directory Command

To  make a directory under Linux operating systems using the command prompt or shell, We need to use the mkdir command to create new folders or directories under Linux operating systems.

mkdir command Syntax

mkdir dirname


mkdir dirname1 dirname2

Login to your server via ssh and use the mkdir command to create empty directories. The following command would create a directory called test:

mkdir foo

To list directories:

ls -l

The following command would create two directories within the current directory:

mkdir cppl cmab
ls -l

The -p option allows you to create parent directories as needed :

mkdir -p ~/public_html/cppl/images