mkdir

Makes a directory

mkdir [option] directory-list

The mkdir utility creates one or more directories.

Arguments

The directory-list contains one or more pathnames of directories that mkdir creates.

Options

--mode mode

-m mode Sets the permission to mode. You may use either the symbolic form or an octal number to represent the mode. Refer to page 1103 for more information on chmod.

--parents

-p Creates any directories that do not exist in the path to the directory you wish to create.

Notes

You must have permission to write to and search (execute permission) the parent directory of the directory you are creating. The mkdir utility creates directories that contain the standard invisible entries . and . . .

Examples

The following command creates ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.