Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux mkdir command

Linux mkdir command

Linux Command Reference Linux Command Reference

The Linux mkdir (short for make directory) command is used to create directories.

Syntax

mkdir [-p] dirName

Parameter Description:

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 Linux Command Reference