mkdir Linux Commands

What is Linux mkdir Command?

Explanation

mkdir COMMAND:

mkdir command is used to create one or more directories.

SYNTAX :


mkdir [options] directories

OPTIONS:


-m Set the access mode for the new directories.
-p Create intervening parent directories if they don't exist.
-v Print help message for each directory created.

EXAMPLE:


  1. Create directory:
    mkdir test

    The above command is used to create the directory 'test'.
  2. Create directory and set permissions:
    mkdir -m 666 test

    The above command is used to create the directory 'test' and set the read and write permission.

Ask Questions

Ask Question