How to create a new folder in ubuntu terminal
To create a new folder in the Ubuntu terminal, you can use the mkdir
command followed by the name of the folder you want to create.
Here's the basic syntax:
mkdir [folder_name]
Replace [folder_name]
with the name you want to give to your new folder.
For example, to create a folder named "myfolder", you would type:
mkdir myfolder
Press Enter to execute the command, and the folder will be created in your current working directory.
You can also create a new folder in a specific directory by specifying the full path to the folder. For example:
mkdir /path/to/new/folder
Replace /path/to/new/folder
with the path where you want to create the new folder.
Some additional options you can use with the mkdir
command:
-p
creates the folder and all its parent directories if they don't exist:mkdir -p /path/to/new/folder
-v
verbose mode, shows the folder creation process:mkdir -v myfolder
-m
sets the permissions for the new folder:mkdir -m 755 myfolder
Note: If you want to create a folder with a space in its name, you need to enclose the name in quotes, like this: mkdir "my folder"
.