Multiple choice linux

From a command prompt, what does the command "ls" do?

  1. Lists the settings of the OS

  2. Lists the contents of the directory

  3. List command to list contents of files

  4. Finnish words, means to direct a file to a port

  5. None of the Above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The ls command (list) displays the contents of the current directory. This is one of the most fundamental Linux/UNIX commands for file system navigation. Option B correctly states this basic functionality.

AI explanation

In a Unix/Linux command-line environment, ls (list) displays the contents (files and subdirectories) of the current or specified directory. This is one of the most fundamental shell commands. It does not list OS settings, and it isn't a 'list command for file contents' (that would be cat or less) or a Finnish-language redirect operator — those are humorous distractors. So 'Lists the contents of the directory' is correct.