Rock the LPIC-1 Certification 2025 – Unleash Your Linux Prowess!

Question: 1 / 400

What command is used to create a new directory in Linux?

touch

mkdir

The command used to create a new directory in Linux is mkdir. This command stands for "make directory," and it is specifically designed to create one or more directories in the specified path. When you run mkdir followed by the directory name, the system allocates the necessary space and creates that directory in the filesystem.

For example, using the command `mkdir new_directory` will create a directory named "new_directory" in the current working directory. Additionally, mkdir has options that allow for creating parent directories as needed, enabling users to create entire directory structures in one command by using flags like `-p`.

The other commands serve different purposes: touch is primarily used to create empty files or update the timestamps of existing files; rmdir is used to remove empty directories; and dir is typically a command used in DOS and Windows command-line environments to list the contents of a directory, although it may also work in some Linux environments as an alias for ls. Understanding their distinct functionalities is essential for working effectively in a Linux environment.

Get further explanation with Examzify DeepDiveBeta

rmdir

dir

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy