Home > Article > System Tutorial > What command is used to create a directory in linux?
The command to create a directory in Linux system is mkdir, its syntax is as follows: mkdir [option] directory name, the options include: -p creates a non-existent parent directory; -v displays the created directory; -m settings Directory permissions. For example, create a directory named mydir: mkdir mydir; create a directory named securedir with 755 permissions: mkdir -m 755 securedir; create a directory named nesteddir under a non-existent parent directory: mkdir -p /path/ to/nesteddir.
Command to create directory in Linux
In Linux operating system, the command to create directory is mkdir
.
Syntax
##mkdir [options] Directory name
Options
: Create a non-existent parent directory.
: Display the created directory.
: Set the permissions of the directory.
Example
Create a directory named mydir
<code>mkdir mydir</code>
Create a directory named securedir with 755 permissions
<code>mkdir -m 755 securedir</code>
Create a directory named nesteddir under a non-existent parent directory
<code>mkdir -p /path/to/nesteddir</code>
Tip
,
prn or
aux.
commands, or use the
-p option.
The above is the detailed content of What command is used to create a directory in linux?. For more information, please follow other related articles on the PHP Chinese website!