BM Balmiki Mandal 04 May 2023 10 views 0 comments Linux

What is the Mkdir Command in Linux and How to Use It?

What is the Linux 'mkdir' Command?

The Linux 'mkdir' command is used to create directories. This command will allow you to create directories and subdirectories, as well as assign permissions to them. The mkdir command is one of the most commonly used commands in Linux, and it is a great tool for managing your system.

How to Use the 'mkdir' Command

Using the 'mkdir' command is quite straightforward. All you need to do is specify the name of the directory that you want to create. For example, if you wanted to create a directory called ‘my_folder’:

$ mkdir my_folder

You can also use the '-p' flag when running 'mkdir' to create multiple levels of directories at once. For example, if you wanted to create a directory called ‘my_folder’ with a subdirectory called ‘my_sub_folder’:

$ mkdir -p my_folder/my_sub_folder

Furthermore, you can set the permissions of each directory by using the '-m' flag. For example, if you wanted to set the permissions of the ‘my_folder’ directory to 755:

$ mkdir -m 755 my_folder

Conclusion

In conclusion, the 'mkdir' command is an incredibly useful command for creating directories and subdirectories, as well as setting permissions on those directories. It is a must-know command for any Linux user.

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

How to Create an Embedded Linux Development Environment on Windows Using WSL2

 Creating an Embedded Linux Development Environment on Windows Using WSL2If you are learning Embedded Linux, y...

AG Anvesh G 05 Sep 2026
Installing Ubuntu OS in Window Using VirtualBox

Installing Ubuntu on Windows Using VirtualBoxSteps:-1. Download and Install VirtualBox Download VirtualBox fr...

BM Balmiki Mandal 18 Jan 2025
Kali Linux 2021.4, Apple M1 support, armhf, arm64, Electro4u

Kali Linux 2021.4 Brings Improved Apple M1 Support Kali Linux, the world’s premier open-source penetration te...

BM Balmiki Mandal 06 Jun 2023