Linux for Developers
/Beginner
mkdir
Definition
Make Directory. The command used to create new directories (folders) in the file system.
Explain Like I'm New
The 'Create New Folder' button in the terminal.
Real World Example
You start a new project. You type `mkdir src` and it creates a folder named 'src'.
Common Use Cases
- •Organizing files
- •Scripting project setups
Crucial Command Flags
| Flag / Option | Description |
|---|---|
| -p | Parents. Create parent directories as needed, no error if existing. |
| -v | Verbose. Print a message for each created directory. |
Interview Questions
basic
- What does `mkdir` stand for?
intermediate
- How do you create a folder AND a subfolder inside it at the exact same time (e.g., `mkdir parent/child`) without getting an error?