Home >Operation and Maintenance >Linux Operation and Maintenance >What is the command to create a directory in Linux?
The mkdir command is the abbreviation of make directories and is used to create new directories. This command can be used by all users.
Recommended: Linux self-study video
The basic format of the mkdir command is:
[root@localhost ~]# mkdir [-mp] 目录名
-m option is used for manual configuration Permissions for the created directory instead of using the default permissions.
-p option creates all directories recursively, taking the creation of /home/test/demo as an example. By default, you need to create each directory layer by layer. If you use the -p option, the system will Automatically create /home, /home/test and /home/test/demo for you.
Example:
[root@localhost ~]#mkdir cangls [root@localhost ~]#ls anaconda-ks.cfg cangls install.log install.log.syslog
PHP Chinese website, a large number of Introduction to Programming tutorials, welcome to learn!
The above is the detailed content of What is the command to create a directory in Linux?. For more information, please follow other related articles on the PHP Chinese website!