FREE CompTIA Linux+ Linux GNU and Unix Commands Questions and Answers

0%

Which of the following commands is used to display the current working directory in Linux?

Correct! Wrong!

The pwd (print working directory) command displays the current directory the user is in. It is essential for navigation in the terminal.

Which of the following commands is used to change the ownership of a file in Linux?

Correct! Wrong!

The chown command is used to change the owner of a file or directory. You can also use it to change the group ownership with the syntax chown [user]:[group] [file].

Which command is used to view the contents of a text file, one page at a time?

Correct! Wrong!

The less command allows you to view large files one page at a time. It is more advanced than more, as it allows both forward and backward navigation within the file.

Which of the following commands is used to search for a specific pattern in a file in Linux?

Correct! Wrong!

The grep command is used to search for patterns within a file or output. It supports regular expressions and is an essential tool for text searching in Linux.

What does the chmod command do in Linux?

Correct! Wrong!

The chmod (change mode) command is used to modify the file permissions for users, groups, and others. Permissions can be set using either symbolic (r, w, x) or octal (numeric) notation.

Premium Tests $49/mo
FREE February-2025