---
name: "plan9-mkdir"
section: "1"
platform: "linux"
package: "9base"
version: "1:6-5"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/plan9-mkdir"
---

# plan9-mkdir(1)

make a directory

## NAME

mkdir - make a directory

## SYNOPSIS

**mkdir** \[ **-p** \] \[ **-m** *mode* \] *dirname ...*

## DESCRIPTION

*Mkdir* creates the specified directories. It requires write permission in the parent directory.

If the **-p** flag is given, *mkdir* creates any necessary parent directories and does not complain if the target directory already exists.

The **-m** flag sets the permissions to be used when creating the directory. The default is 0777.

## SEE ALSO

[*rm*(1)](/rm/1.md)\
 *cd* in [*rc*(1)](/rc/1.md)

## SOURCE

**/src/cmd/mkdir.c**

## DIAGNOSTICS

*Mkdir* returns null exit status if all directories were successfully made. Otherwise it prints a diagnostic and returns **"error"** status.
