• Multiple directories can be named to create and also sub-directories can be named in the particular order will also be created using the mkdir command.
  • The mkdir command is very simple and has useful command options to make things more efficient. So let's see how to create directories in Linux terminal.
  • It is similar to using your mouse and keyboard to create new folders, but the mkdir command is used on the command line.
  • $ mkdir /tmp/newdir. ... $ mkdir -p Projects/ravesli.com/src/assets/images.
  • The `mkdir` command is the answer! mkdir stands for “make directory”, and it’s one of the most useful Linux commands.
  • mkdir command creates the folder if it does not exists. If the folder already exists then based on the option provided, it will decide whether to show error or not.
  • You’ll find a few of these options very helpful, although that isn’t to say that mkdir on its own doesn’t already cover a wide array of administration situations.
  • Just like other Linux commands, the syntax of the mkdir command is mainly divided into two groups – options and arguments
  • The mkdir is an essential tool provided by all Linux distributions like Ubuntu, Debian, Mint, Kali, Fedora, CentOS, RHEL by default.
  • $ mkdir testdir admins-power-mac-g5:~ admin$. The example includes an extended prompt that shows the current working directory.