Study for the TestOut Linux Pro Exam with our engaging quiz. Prepare using our flashcards and comprehensive multiple choice questions, each with hints and explanations to help you succeed. Get ready for your Linux certification today!

Practice this question and more.


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

  1. mkdir

  2. rmdir

  3. ls

  4. cp

The correct answer is: mkdir

The command used to create a new directory in Linux is "mkdir," which stands for "make directory." This command is fundamental in Unix-like operating systems, allowing users to organize their file systems by creating folders for better storage management. When you run the command followed by the name of the directory you want to create, it effectively generates the specified directory in the current working location unless a path is provided. For example, using the command `mkdir new_folder` will create a directory named "new_folder" in the current directory. This versatility is essential for maintaining an orderly file structure, especially as the number of files increases. The other commands serve different functions: "rmdir" is used for removing empty directories, "ls" lists files and directories within a specified directory, and "cp" is utilized for copying files or directories. Each of these commands has its specific purpose and does not relate to the creation of a new directory.