English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux mkdir Command

Linux Command大全

The Linux mkdir (full English name: make directory) command is used to create directories.

Syntax

mkdir [-p] dirName

Parameter Description:

  • -p ensures that the directory name exists; if it does not exist, create one.

Online Examples

Create a directory named w3Subdirectory of codebox :

mkdir w3codebox

In the working directory under w3codebox2 Create a subdirectory named test in the directory.

If w3codebox2 If the directory originally does not exist, create one. (Note: In this example, if the -p parameter, and originally w3codebox2 Error will be produced if the directory does not exist.)

mkdir -p w3codebox2/test

Linux Command大全