Which command is used to create a new directory in bash?

Prepare for the LPI Linux Essentials Exam. Study with flashcards and multiple choice questions, each with hints and explanations. Get exam-ready!

The command that is used to create a new directory in bash is "mkdir." This stands for "make directory" and is a fundamental command in Unix-like operating systems, including Linux. When you execute this command followed by the name of the directory you want to create, it establishes a new directory at the specified location.

For example, typing "mkdir new_folder" would create a new directory named "new_folder" in the current working directory. This command is essential for organizing files in the file system, allowing users to create a structured hierarchy of directories.

The other choices are not valid commands in bash. "make dir" and "create dir" do not exist as commands in the shell, while "newdir" is also not recognized as a standard command for directory creation. Understanding the correct commands and their syntax is crucial for efficient command line usage in Linux.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy