From a command prompt, what does the command "ls" do?
-
Lists the settings of the OS
-
Lists the contents of the directory
-
List command to list contents of files
-
Finnish words, means to direct a file to a port
-
None of the Above
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.
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.