Home  >  Article  >  Operation and Maintenance  >  What is the command to create a directory in Linux?

What is the command to create a directory in Linux?

尚
Original
2020-03-03 13:00:4712973browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn