The Linux command, mkdir
command is useful to create one or more new directories.
Determine the type of mkdir command
The mkdir
is a file command, go through the below explanation you'll understand.
type mkdir
# mkdir is /usr/bin/mkdir
Executing type mkdir
on terminal gives mkdir is /usr/bin/mkdir
as output in Ubuntu 20.04 LTS default(bash) shell.
type -t mkdir
# file
Executing type mkdir
on terminal gives file
as output in Ubuntu 20.04 LTS default(bash) shell.
This article shows the basic usage of mkdir
command with examples.
The mkdir
command
Also can be used to create multiple folders/directories.
Syntax
mkdir [OPTION] [DIRECTORY]...
This command accepts one or more directory name separated by space.
Options
--help
It displays the command help information.
-v
or--verbose
It displays a verbose message for every directory created.
--version
It displays a command version info.
-p
Useful to create nested directories
How to create a new directory
To create a new directory named practice you would execute the following command:
mkdir practice
The directory named practice will be created in the current working directory & you can verify it using the ls
command as shown below.
ls -l
drwxrwxr-x 2 user user 4096 Mar 29 09:35 practice
Read the complete post on our site Create directories or folders in Linux with mkdir command
Read others post on our site MeshWorld
Happy ๐ coding
With โค๏ธ from ๐ฎ๐ณ