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?
Topics

Rakshitha
White-Label Services Specialist • 5+ years
Rakshitha specializes in white-label IT services and Linux server administration. She helps MSPs expand their service offerings through strategic outsourcing partnerships and provides expert guidance on Linux-based infrastructure solutions.
More in Managed IT Services
View all
48 SMB IT Spending Statistics for 2026 — Budget & Priorities
18 min read

60 Enterprise AI Statistics for 2026 — Adoption, ROI & Spending
22 min read

67 AI Adoption Statistics for 2026 — Enterprise & SMB Data
20 min read

55 IT Spending Statistics for 2026 — Global Budget Data
18 min read

Oracle Is Firing 30,000 People to Pay for AI Data Centers
11 min read

Which Tech Companies Will Fire Next? 7 Signals That Predict Layoffs
12 min read