nerdexam
CompTIA

220-1002 · Question #500

A user is working with the command line interface on a Linux computer. To show the contents of the current directory, which of the following commands should be used?

The correct answer is A. Is. In Linux (and Unix-like operating systems), the ls command (short for 'list') displays the contents of the current directory. Note that choice A appears as 'Is' with a capital I, but this is a common font rendering issue on exams - it is actually ls (lowercase L followed by s)…

Hardware and network troubleshooting

Question

A user is working with the command line interface on a Linux computer. To show the contents of the current directory, which of the following commands should be used?

Options

  • AIs
  • Bdir
  • C-get
  • Dmv

How the community answered

(33 responses)
  • A
    88% (29)
  • B
    3% (1)
  • C
    6% (2)
  • D
    3% (1)

Explanation

In Linux (and Unix-like operating systems), the ls command (short for 'list') displays the contents of the current directory. Note that choice A appears as 'Is' with a capital I, but this is a common font rendering issue on exams - it is actually ls (lowercase L followed by s). The dir command (B) is the Windows equivalent and is not the standard Linux command. -get (C) is not a valid standalone command. mv (D) is the Linux command used to move or rename files, not to list directory contents.

Topics

#Linux CLI#ls command#directory listing#shell commands

Community Discussion

No community discussion yet for this question.

Full 220-1002 Practice