Create Directory Unix

Create Directory Unix

To create directory or sub-directory inside a directory you can use “mkdir” command with right permission. If you try to create directory without permission you will get permission denied error. To create directory with super user access please use “sudo” as shown in example:

  • If you want to create sub-directory name “apps” inside root directory use below:

$ sudo mkdir apps
Create Directory Unix

  • If you want to create multiple sub-directory name “test” “test1” “test2” inside root directory please use below:

$ sudo mkdir test test1 test2
Create Directory Unix

  • If you want to create directory structure name /project/MyTestProject/Files for your project please use below:

$ sudo mkdir -p /project/MyTestProject/FilesCreate Directory Unix

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *