Skip to content

Linux mkdir Command Builder (Create Directories)

The mkdir command is used to create directories (folders) in Linux. This interactive mkdir Command Builder helps you generate precise mkdir commands for creating directory structures.


🚀 What is the mkdir Command?

The mkdir command allows you to:

  • Create new directories
  • Create multiple directories at once
  • Create parent directories automatically
  • Set permissions on creation
  • Set SELinux context

⚙️ Basic Syntax

mkdir [options] DIRECTORY
mkdir [options] DIRECTORY1 DIRECTORY2 ...

🧠 How to Use This mkdir Command Builder

This tool helps you:

  • Specify directory names
  • Create parent directories automatically
  • Set permissions on creation
  • Generate a ready-to-use mkdir command

Workflow

  1. Specify directory path(s)
  2. Use -p to create parents automatically
  3. Optionally set permissions
  4. Copy generated command

🔧 Common mkdir Usage Patterns

Create a Single Directory

mkdir mydir

Create Multiple Directories

mkdir dir1 dir2 dir3

Create Nested Directory Structure

mkdir -p path/to/nested/directory

Create with Specific Permissions

mkdir -m 755 mydir

Create Nested with Permissions

mkdir -p -m 700 private/secret/folder

Verbose Output

mkdir -v mydir

🔧 Permission Examples

  • 755 - rwxr-xr-x (readable by all, writable by owner)
  • 700 - rwx------ (only owner can access)
  • 777 - rwxrwxrwx (everyone can do everything - unsafe!)

✅ Pro Tips

  • Always use -p when creating nested directories
  • Use -m to set secure permissions upfront
  • Use -v to confirm directory creation
  • Avoid 777 permissions in production environments

Related Tools

Explore other developer tools that pair well with Linux command builders:

Related Tools

Try these complementary developer tools:

Popular Developer Tools

Most-used tools on LangStop