DevNet Associate 1.2.3 Quiz Module 1 Quiz – Linux Review (Answers)
1. What Linux command is used to display the contents of the current directory?
- pwd
- cat
- ln
- ls
2. What command is used to rename a file in a Linux system?
- mv
- dd
- cp
- rm
3. A user issues a Linux command and the result is shown.
total 40 drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Videos drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Templates drwxr-xr-x 5 devasc devasc 4096 Mar 30 21:24 snap drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Public drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Pictures drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Music drwxr-xr-x 5 devasc devasc 4096 Mar 30 21:21 labs drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Downloads drwxr-xr-x 2 devasc devasc 4096 Apr 15 19:09 Documents drwxr-xr-x 2 devasc devasc 4096 Mar 30 21:25 Desktop devasc@labvm:~$
Which Linux command is used to display the contents of the current directory as shown?
- ls -l
- ls -a
- ls -lr
- ln
4. A system administrator of a Linux server is searching the passwd file for the username taylor that appears at the beginning of the line. Which grep command should the administrator use?
- grep taylor /etc/passwd
- grep ‘.taylor’ /etc/passwd
- grep ‘^taylor’ /etc/passwd
- grep ‘[taylor]’ /etc/passwd
5. A user issues the apt-get upgrade command to update system files in a Ubuntu Linux system and receives an error message of “permission denied.” What should the user do to complete the task?
- Issue the allow apt-get upgrade command.
- Issue the sudo apt-get install command.
- Issue the apt-get install –allow command.
- Issue the sudo apt-get upgrade command.