Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
No Result
View All Result
Home Linux

mkdir Command in Linux (Create Directories)

admin by admin
August 13, 2022
Reading Time: 2 mins read
0
mkdir Command in Linux

In this article,  we are going to learn about mkdir Command in Linux. The mkdir is probably the most used command and for good reason. With it, we can create a new directory. The mkdir command is used to create directories.

Contents hide
1 Linux mkdir Command Syntax
2 How to Create a New Directory
3 How to Create Parent Directories
4 Conclusion

mkdir command is always used for creating new directories in Linux. We can easily create the directory using this command. if we want to use Sudo command then we can make a directory anywhere using this command without any hassle.

Linux mkdir Command Syntax

$ mkdir [OPTION] [DIRECTORY]

The command takes one or more directory names as its arguments.

How to Create a New Directory

To create a directory in Linux, pass the directory’s name as the argument to the mkdir command. The following command would create a single directory named dir1

$ mkdir dir1

You can verify that the directory was created by listing the contents using the ls command :

$ ls -l

Output

drwxrwxr-x 2 linuxips linuxips 4096 Aug 13 16:15 dir1
Create multi Directory

The following command would create many directories with different names.

$ mkdir dir1 dir2 dir3

How to Create Parent Directories

A parent directory is a directory that is above another directory in the directory tree. To create parent directories, use the -p option

$ mkdir -p /home/linuxips/dir1/dir2/dir3

When the -p option is used, the command creates the directory only if it doesn’t exist.

Conclusion

So this is the mkdir Command in Linux is used to create new directories. However, if you want to know more about this command’s usage, you can execute the “mkdir –help” command in Linux for accessing the help manual of this command. You can use it as you want. Enjoy!!!

Related Linux Tutorials:

  • How to Install Cisco Packet Tracer on Ubuntu.
  • How to install Tweak Tool on Ubuntu 21.04.
  • ZSH to BASH | How to Install ZSH on Ubuntu.
  • How to Install Ubuntu.
  • ls Command in Linux
  • How to Install Ubuntu Serve 22.04 LTS
ShareTweetSendShareShare
Previous Post

How to install missing ifconfig command on Linux

Next Post

How To Add User To Sudo Group on Debian 11

admin

admin

Linuxips is a Linux blog that publishes articles and tutorials about server operations, installations, new techniques and Linux security.

Related Posts

Install ZSH on Arch Linux
Arch Linux

How to Install ZSH on Arch Linux

January 6, 2024
How To Use AppImage in Linux
Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu
Linux

How To Install uGet Download Manager On Ubuntu

March 8, 2023
Linux Files and Directories
Linux

Linux Files and Directories

March 3, 2023
How to Create Files With Passwords in Linux
Linux

How to Create Files With Passwords in Linux

February 27, 2023
pwd Command in Linux
Commands

pwd command in Linux

November 6, 2022

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

You might also like

Install ZSH on Arch Linux

How to Install ZSH on Arch Linux

January 6, 2024
How to Install ZSH on Kali Linux 2024.1

How to Install ZSH on Kali Linux

January 5, 2024
How To Use AppImage in Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu

How To Install uGet Download Manager On Ubuntu

March 8, 2023
How to Install ZSH on Ubuntu 22.10

How to Install ZSH on Ubuntu 22.10

March 7, 2023
Linux Files and Directories

Linux Files and Directories

March 3, 2023

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.

  • Home
  • Web Stories
  • Privacy Policy
  • Contact Us
  • Disclaimer
No Result
View All Result
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.