Online Linux Terminal Logo
OnlineLinuxTerminal
DateioperationenCLI Manual

$mkdir

Create new directories and folder hierarchies.

BefehlssyntaxPOSIX Standard
mkdir [OPTIONS] DIRECTORY...
Linux-Community2.4k Online

Tausche dich mit Linux-Nutzern aus, lerne Befehle und lade PDF-Cheatsheets herunter.

Live im interaktiven Terminal ausprobieren

Client-seitige Simulation ohne Installation mit sofortigem Feedback.

Im Vollbild-Terminal öffnen ↗
bash — terminal

Überblick & Funktionsweise

`mkdir` (Make Directory) creates one or more new directories in the file system. With the `-p` (parents) flag, it can create complete nested directory paths in a single command without throwing errors if intermediate folders already exist.

Wichtige Optionen und Flags

Flag / OptionDescription
-p, --parentsCreate intermediate parent directories as needed without error if existing.
-m, --mode=MODESet file permission mode for new directories upon creation (e.g., -m 700).
-v, --verbosePrint a confirmation message for every created directory.

Praktische Anwendungsbeispiele

#1Create nested directory hierarchy in one step
mkdir -p /home/user/workspace/src/components && ls -R /home/user/workspace

Creates workspace, src, and components directories automatically.