DEV Community

Cover image for mkdir Command in Linux
Rajdeep Singh
Rajdeep Singh

Posted on • Edited on • Originally published at officialrajdeepsingh.dev

mkdir Command in Linux

mkdir Command helps to create new directories. If the directory present already in the case doesn’t create new directories and gives a warning message inside the terminal.

Syntax:

mkdir [OPTION]... DIRECTORY...
Enter fullscreen mode Exit fullscreen mode

mkdir command output


Command Options

mkdir -m=Mode linuxBook

-m Option help to assign new permission on creating time (Like in chmod)

Mode Options:

rwx: read-write execute permission on this file
wx: only write execute permission on this file
rx: only Read execute permission on this file
rw: only Read execute permission on this file

mkdir -m option output


mkdir -p or mkdir --parents

-p option does not show an error if the directory exists. also, the directory that exists then overwrites your directory. your directory does not exist then create a new directory.

mkdir -p option output


mkdir -v or mkdir --verbose

check working behind mkdir command and print a message in the terminal after each created directory

mkdir -v flag output


mkdir --help

display this help and exit

mkdir --help flag output


mkdir --version

output mkdir command version information.

mkdir --version flag output


man mkdir

print mkdir manual page Information Inside Your Cmd Tool.
man mkdir output


Hire me:

Fiverr:

https://www.fiverr.com/users/officialrajdeep/

Upwork:

https://www.upwork.com/freelancers/~01a4e8ba7a41795229


Contact me

Heroku

Amplify your impact where it matters most — building exceptional apps.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay