Home > Article > System Tutorial > What is the command to create a new folder in linux?
In Linux, there are two ways to create a new folder: use the mkdir command: mkdir directory name, such as mkdir new_folder use the touch command: touch directory name, such as touch empty_folder
Commands to create new folders in Linux
In Linux systems, there are the following two common commands to create folders:
1. mkdir
The mkdir command is used to create a new directory. The basic syntax is:
<code>mkdir 目录名</code>
For example, to create a folder named "new_folder":
<code>mkdir new_folder</code>
2. touch
touch command is usually Used to create or update files, but it can also be used to create empty directories. The basic syntax is:
<code>touch 目录名</code>
For example, to create an empty directory named "empty_folder":
<code>touch empty_folder</code>
Although the touch command can also create directories, it is recommended to use the mkdir command because it is specifically used for for this purpose.
The above is the detailed content of What is the command to create a new folder in linux?. For more information, please follow other related articles on the PHP Chinese website!