Linux command: mkdir

A quick guide to the mkdir command for creating folders

You create a folder usingmkdircommand:

mkdir fruits

You can create multiple folders with one command:

mkdir dogs cars

You can also create multiple nested folders by adding the following-pOptions:

mkdir -p fruits/apples

Options in UNIX commands usually take this form. You add them immediately after the command name, and they change the behavior of the command. You can usually combine multiple options.

You can find the options supported by the command by typingman <commandname>. Try nowman mkdirFor example (pressqThe key to exit the man page). Man pages are excellent built-in help for UNIX.

Download mine for freeLinux Command Manual

More cli tutorials: