Linux mkdir command
The Linux mkdir (short for make directory) command is used to create directories.
Syntax
mkdir [-p] dirName
Parameter Description:
- -p Ensure the directory name exists; create one if it does not.
Example
In the working directory, create a subdirectory named runoob:
mkdir runoob
In the runoob2 directory under the working directory, create a subdirectory named test.
If the runoob2 directory does not originally exist, create one. (Note: in this example, if the -p parameter is not added and the runoob2 directory does not originally exist, an error will occur.)
mkdir -p runoob2/test
Linux Command Reference