The command mkdir stands for "make directory." It is used in Linux and other Unix-like operating systems to create a new directory (folder) in the file system.
Basic Usage
-
Creating a Single Directory:
To create a new directory, you simply typemkdirfollowed by the name of the directory you want to create.mkdir my_directory -
Creating Multiple Directories:
You can create multiple directories at once by listing them after the command.mkdir dir1 dir2 dir3 -
Creating Parent Directories:
The-poption allows you to create parent directories as needed. For example, if you want to create a nested directory structure:mkdir -p parent/child/grandchildThis command will create
parent,child, andgrandchilddirectories, creating any that do not already exist.
Summary
In summary, mkdir is a simple yet powerful command for organizing files and directories in the Linux file system. If you have any more questions or need further clarification, feel free to ask!
