NDG Linux Unhatched Exam Answers Full Assessment 100% Scored
1. What does CLI stand for?
- Command Line Interface
- Core Line Interface
- Core Learning Interface
- Command Learning Interface
2. When entering a command, do arguments or options typically come first?
- Arguments
- Options
3. Which of the following is not a correct way to combine options?
- -r l
- -l -r
- -lr
- -rl
4. Which command will print your current location in the filesystem?
- cd
- pwd
- pd
- pcl
5. Which of the following is not an example of a relative path?
- home/sysadmin/Documents/School/Art
- Documents/Work
- Documents
- /home
6. The ~ (tilde) character is used to represent:
- A user’s home directory
- The directory above the current directory
- The current directory
- Nothing, it doesn’t have a special meaning
7. The .. (double period) characters are used to represent:
- The current directory
- The directory above the current directory
- Nothing, it doesn’t have a special
- A user’s home directory
8. The . (period) character is used to represent:
- The directory above the current directory
- A user’s home directory
- Nothing, it doesn’t have a special meaning
- The current directory
9. The first character in a long listing ls -l indicates:
- Hard Link Count
- File Size
- Permissions
- File Type
10. Which option to the ls will sort the output by file size?
- -z
- -s
- -r
- -S
11. Which of the following sets has the group permissions highlighted?
rw-rw-r--
rw-rw-r--
rw-rw-r--
rw-rw-r--
12. Which command will allow a user to change the permissions of a file?
- chown
- chmod
- chperm
- perm
13. Changing the user owner of a file requires administrative access.
True or False?
- True
- False
14. The mv command requires at least two arguments.
True or False?
- True
- False
15. Which command can be used to copy a file?
- cp
- rm
- cy
- mv
16. Which option to the rm command will allow a user to delete directories?
- -l
- -d
- -r
- -a
17. Which of the following commands will return only lines that end with test?
- grep ‘^test’ file.txt
- grep ‘test$’ file.txt
- grep ‘$test’ file.txt
- grep ‘test^’ file.txt
18. Which of the following lines would be not returned by the grep ‘[^0-9]’ file.txt command?
- My favorite food is avocados.
- I am 37 years old.
- 3121991
- Hello my name is Joe.
19. Which of the following lines would be returned by the grep ‘b[oe]t’ file.txt command?
- bet
- beet
- boot
- boet
20. Which of the following commands will not shutdown the system immediately?
- shutdown now ‘Goodbye World!’
- shutdown now
- shutdown
- shutdown +0
21. Which of the following commands can be used to display network configuration information?
- ifconfig
- netconfig
- pwd
- net
22. Which of the following commands will display every process?
- ps -e
- ps –all
- ps -a
- ps
23. The ps command requires administrative access.
True or False?
- True
- False
24. Which of the following will delete all of a package’s files?
- apt-get remove
- apt-get trash
- apt-get delete
- apt-get purge
25. Users can update their own passwords.
True or False?
- True
- False
26. The root user can change the password of any user.
True or False?
- True
- False
27. Which option can be used to view status information about the current user’s password?
- -S
- -s
- -I
- -i
28. The > character is used for which of the following file descriptors?
- STDERR
- STDIN
- STDOUT
29. Which of the following commands will display the last five lines of a file called file1.txt?
(choose two)
- tail -5 file1.txt
- head -n 5 file1.txt
- tail -n 5 file1.txt
- tail file1.txt
30. The ping command uses IP addresses to identify a computer on a network.
True or False?
- True
- False
31. Commands are case-sensitive.
True or False?
- True
- False
32. Which command will allow you to change your current directory?
- chdir
- cd
- ls
- ch
33. Which of the following is NOT an example of an absolute path?
- Documents
- /
- /home/sysadmin
34. The ls command without options or arguments…
- …lists the contents of the current directory.
- …generates an error as this command.
- …lists the contents of a user’s home.
- …prompts for a directory to list.
35. Which of these commands will create a new shell logged in as the root user?
- sudo
- su
36. Which of the following sets has the owner permissions highlighted?
rw-rw-r--
rw-rw-r--
rw-rw-r--
rw-rw-r--
37. Which of the following sets has the other permissions highlighted?
rw-rw-r--
rw-rw-r--
rw-rw-r--
rw-rw-r--
38. Which of the following permission sets indicates that others have only the read permission?
- rwxrw-r-x
rw-rw-r--
- r–r–r-x
- rw-r–rwx
39. Which of the following commands is used to change the ownership of a file?
- chperm
- chown
- chow
- chmod
40. Which of the following commands can be used to rename a file?
- mv
- rn
- name
- cp
41. The cp command requires at least two arguments.
True or False?
- True
- False
42. Which command is used to copy files at the bit level?
- cp
- dd
43. The rm command requires at least two arguments.
True or False?
- True
- False
44. Which of the following commands is used to filter text?
- grep
- text
- dd
- regex
45. Which of the following commands will return only lines that begin with test?
- grep ‘*test’ file.txt
- grep ‘[test]’ file.txt
- grep ‘$test’ file.txt
- grep ‘^test’ file.txt
46. Which of the following commands will update all packages?
- apt-get search
- apt-get install
- apt-get upgrade
- apt-get update
47. Which of the following commands should be executed before installing a package?
- apt-get upgrade
- apt-get search
- apt-get update
- apt-get install
48. Which of the following commands can be used to print output to the terminal?
- ls
- echo
- cp
- chmod