DELAPARRA
Index
Color
NL
Category: CLI commands

mkdir

Explained by Updated

What is mkdir?

mkdir: Make Directory — Create a new directory. mkdir creates a new directory. mkdir uploads creates one folder, and mkdir -p storage/app/exports/2026 creates the whole path, including any missing parent folders. The -p option also makes the command safe to run when the folder already exists, which matters in scripts and Dockerfiles that may run more than once.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about mkdir

What should you keep in mind with mkdir?

New folders get permissions from your current settings, so check who needs to write to them. A folder created by root during a deploy may not be writable by the web server user, which leads to confusing "permission denied" errors later. Setting the owner right after creating it, or creating it as the correct user, avoids that. mkdir -m 755 sets permissions directly at creation.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with M

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.