main logo

Simplify your tasks: Create Directories in just a few steps

Simplify Your Tasks: Create Directories in Just a Few Steps

 

In this post we will see how to create Directories in CentOS using terminal commands. CentOS is a Community Enterprise operating system which mainly focuses on the server. It is a part of Linux Operating System Distribution, and it is free to use.

Total Time Needed: 30 Minutes

Required tools:

CentOS

Steps to create Directories in CentOS

Step 1 : 1. Create single directory
To create a single directory:
The Command used to create a Single Directory is mkdir. Enter the Command mkdir along with Directory name, For example, to create a directory dir4 enter the Command mkdir dir4.

Check if the directory is created – Enter the command ls and press Enter. You can see that dir4 is created.

Step 2: Create multiple directories
Use the same command mkdir as above and type all the names of directories to be created. For example, to create directories dir5, dir6, dir7. Type mkdir dir5 dir6 dir7 and press enter

Check if the directories are created: –
Type the command ls and press Enter. You can see that dir5, dir6, dir7 are created

Step 3: Create a directory at a particular location
To create a directory in a different location, type the command mkdir, and the path to the location. For example, to create a directory Dir8 in Desktop, the path to the desktop is /root/Desktop. Type mkdir /root/Desktop/ Dir8.

Step 4: Create multiple directories inside each other.
To create a directory inside another directory which is not created yet use the command
mkdir –p . For example, to create a directory dire inside dird which is inside dire.
Type mkdir –p dirc/dird/dire and press enter

Conclusion:
Now you can create Directories in CentOS easily following these steps. However, if you have any doubts and need help to manage you Linux infrastructure please reach medha Hosting.
Read Here: How To Install CentOS On Virtual Machine?

Rakshitha
Rakshitha
Rakshitha a cloud hosting expert who helps businesses get the most out of their cloud services. She has experience setting up and managing cloud environments to improve performance and scalability. With her cloud certification, Rakshitha provides clear advice on how to use cloud solutions effectively for better business results.
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: sales@medhahosting.com
©Medha Cloud 2024. All rights reserved.