mkdir Linux Commands – Overview with Examples and FAQs

Introduction

The Linux command mkdir is a command used to create a new directory. It stands for “make directory” and is used to create a new folder or directory in the current working directory. The mkdir command is a powerful tool that can be used to create multiple directories at once, as well as set permissions on the newly created directories. It is a very useful command for organizing files and folders on a Linux system.

Examples

The mkdir command in Linux is used to create a new directory.

Syntax:

mkdir [OPTION]… DIRECTORY…

Example:

mkdir my_new_directory
[ad_1]

[ad_2]

Mkdir Linux Command

The mkdir command is a Linux command used to create directories. It stands for “make directory” and is used to create a single or multiple directories and subdirectories. The mkdir command is one of the most basic and frequently used commands in Linux.

The syntax for the mkdir command is as follows:

mkdir [OPTION]... DIRECTORY...

The options for the mkdir command are as follows:

  • -m : Sets the file mode (permissions) of the directory.
  • -p : Creates any missing parent directories.
  • -v : Verbose mode. Prints a message for each created directory.

The mkdir command is used to create a directory with the specified name. For example, to create a directory named “mydir”, the command would be:

mkdir mydir

To create multiple directories at once, the command would be:

mkdir dir1 dir2 dir3

To create a directory and set the file mode (permissions) of the directory, the command would be:

mkdir -m 755 mydir

To create a directory and its parent directories, the command would be:

mkdir -p mydir/subdir1/subdir2

The mkdir command is a powerful and useful command that can be used to create directories and subdirectories quickly and easily. It is an essential command for any Linux user.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

GSTIN is 03EGRPS4248R1ZD.

Contact
Jassweb, Rai Chak, Punjab, India. 143518
Item added to cart.
0 items - 0.00