Home > System Tutorial > LINUX > body text

What is the command to create a new folder in linux?

下次还敢
Release: 2024-04-11 21:21:15
Original
682 people have browsed it

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

What is the command to create a new folder in linux?

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

For example, to create a folder named "new_folder":

<code>mkdir new_folder</code>
Copy after login

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

For example, to create an empty directory named "empty_folder":

<code>touch empty_folder</code>
Copy after login

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!

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