mkdir: Making Folders
Creating directories.
So far we've only looked at folders that already existed. Now let's make our own. The command is MK dir, short for make directory.

- Time to make our own
- mkdir
- Make directory
Make a folder
MK dir projects creates a new folder called projects, in the current folder. It prints nothing. In Linux, no news is good news. If a command succeeds quietly, that's normal. LS shows the new folder is there.
mkdir projects ls Documents Downloads Music Pictures notes.txt projects todo.txt
Several at once
You can make several folders in one go, by listing their names. Here we make three folders, for photos, music, and videos, inside a new folder called backup. But wait. The backup folder doesn't exist yet, so MK dir complains.
mkdir backup/photos backup/music backup/videos mkdir: cannot create directory ‘backup/photos’: No such file or directory mkdir: cannot create directory ‘backup/music’: No such file or directory mkdir: cannot create directory ‘backup/videos’: No such file or directory
Parents too, with dash P
Dash P fixes it. It means, make the parent folders too, if they're missing. Now the whole path is created, in one command. Tree draws the folders as a picture, which makes it easy to check.
mkdir -p backup/photos backup/music backup/videos tree backup backup ├── music ├── photos └── videos 4 directories, 0 files
Summary
MK dir makes a folder, you can give it several names, and dash P creates missing parent folders too. Next, making empty files.
Key takeaways- mkdir <name>
- Several names at once
- -p makes parents