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

What is the command to create a directory in Linux?

Release: 2020-03-03 13:00:47
Original
12983 people have browsed it

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] 目录名
Copy after login

-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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template