Advertisement
Guest User

Untitled

a guest
Apr 12th, 2015
632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.17 KB | None | 0 0
  1. CORRECT - See section 9.4
  2. Most of nanos commands take the form of:
  3. Control and another character
  4.  
  5. CORRECT - See section 9.5.2
  6. What does this shell script do?
  7.  
  8. FOO=/tmp/foo
  9. if [ ! d $FOO ]; then
  10. mkdir $FOO
  11. fi
  12. Creates /tmp/foo if it does not exist
  13.  
  14. CORRECT - See section 9.5.1
  15. Given the following part of a script:
  16.  
  17. if [ -f $1 ]; then
  18. echo I am here
  19. fi
  20. What is the meaning of $1?
  21.  
  22. It is the first argument passed to the script
  23.  
  24. WRONG - See section 9.5.1
  25. What is the correct way to assign the word "Hello" to a variable?
  26. $A=Hello
  27.  
  28. CORRECT - See section 9.5.1
  29. Which shell command accepts input from the users keyboard?
  30. read
  31.  
  32. CORRECT - See section 9.5.1
  33. How would you finish your script with an exit code of 42?
  34. exit 42
  35.  
  36. CORRECT - See section 9.5.2
  37. The if command looks for what exit code to consider a condition to be true?
  38. 0
  39.  
  40. CORRECT - See section 9.5.2
  41. The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in?
  42. test $USERS eq 5
  43.  
  44. WRONG - See section 9.5.2
  45. Given the following script:
  46.  
  47. while [ ! f /tmp/foo ]; do
  48. echo n .
  49. process_data > /tmp/foo
  50. done
  51. Which of the following are true?
  52.  
  53. If a file called /tmp/foo exists, process_data wont be run
  54. process_data will never be run
  55.  
  56. WRONG - See section 9.5.2
  57. How would you write a test that says if /tmp/foo is a directory or USERS is greater than 5?
  58. test d /tmp/foo | $USERS > 5
  59.  
  60. CORRECT - See section 10.3
  61. 64 bit platforms can access more memory than 32 bit platforms.
  62. True
  63.  
  64. WRONG - See section 10.3
  65. Which of the following commands will display CPU information?
  66. cpuinfo
  67. lscpu
  68. cat /proc/cpuinfo
  69.  
  70. CORRECT - See section 10.3
  71. A CPU flag...
  72. ...defines the features that the CPU supports
  73.  
  74. CORRECT - See section 10.4.2
  75. Choose all of the following statements that are true in regard to virtual RAM:
  76. Virtual RAM is used when available physical RAM is low.
  77. Virtual RAM is also called swap space
  78. Virtual RAM is stored on a hard drive
  79.  
  80. CORRECT - See section 10.4.3
  81. Which of the following are common busing systems?
  82. USB
  83. PCI
  84.  
  85. WRONG - See section 10.6
  86. A division of a hard drive may be referred to as a _______ . (Choose 2)
  87. partition
  88. block
  89.  
  90. CORRECT - See section 10.6
  91. Which of the following are valid partitioning types?
  92. MBR
  93. GPT
  94.  
  95. CORRECT - See section 10.6
  96. The fdisk command is a tool used for working with the MBR partitioned disks.
  97. True
  98.  
  99. CORRECT - See section 10.6
  100. Which of the following is the valid device file name for the first IDE hard drive on the system?
  101. /dev/hda
  102.  
  103. CORRECT - See section 10.7
  104. Which of the following are valid video cable connector types?
  105. VGA
  106. DVI
  107.  
  108.  
  109. CORRECT - See section 11.3.2
  110. What does the acronym RPM mean?
  111. RPM Package Management
  112.  
  113. CORRECT - See section 11.4
  114. The /proc directory contains a subdirectory for each process present on the system.
  115. True
  116.  
  117. CORRECT - See section 11.4
  118. The Process ID (PID) of the init process is
  119. 1
  120.  
  121. CORRECT - See section 11.6
  122. The process (ps) command shows only processes running in the current shell by default.
  123. True
  124.  
  125. CORRECT - See section 11.8
  126. The free command outputs statistics about:
  127. Memory usage
  128.  
  129. CORRECT - See section 11.7
  130. A load average of 1.0 always means the system is fully loaded.
  131. False
  132.  
  133. CORRECT - See section 11.7
  134. A command that will continuously update statistics about running processes:
  135. top
  136.  
  137. CORRECT - See section 11.6
  138. The following are valid Linux option styles:
  139. Traditional Unix with a single dash (-)
  140. BSD Unix without a dash
  141. GNU long options with two dashes (--)
  142.  
  143. CORRECT - See section 11.4
  144. Which file contains the information passed to the kernel at boot time?
  145. /proc/cmdline
  146.  
  147. CORRECT - See section 11.3.2.4
  148. To get a list of all packages installed on a system using RPM Package Management you can execute:
  149. rpm -qa
  150.  
  151.  
  152. CORRECT - See section 12.3
  153. Which of the following would be considered a host?
  154. A printer attached to the network via an IP address
  155.  
  156. CORRECT - See section 12.5
  157. A network packet contains ...
  158. ...the IP address of the destination machine.
  159. ...the IP address of the source machine.
  160.  
  161. CORRECT - See section 12.4
  162. Only servers have hostnames.
  163. False
  164.  
  165. CORRECT - See section 12.4
  166. Which of the following protocols defines how network communication functions?
  167. TCP/IP
  168.  
  169. CORRECT - See section 12.5
  170. Which of the following are valid IPv4 addresses?
  171. 192.105.10.10
  172. 10.33.55.77
  173.  
  174. CORRECT - See section 12.7.1
  175. The name of the primary wired network devices is ether0.
  176. False
  177.  
  178. CORRECT - See section 12.7.1
  179. Which of the following commands will display your machine's IP address?
  180. ifconfig
  181.  
  182. CORRECT - See section 12.7.6
  183. Which of the following commands will allow you to log into a remote machine?
  184. ssh
  185.  
  186. CORRECT - See section 12.7.6
  187. Which of the following commands will allow you to log into the machine server1 with the account name nick?
  188. ssh nick@server1
  189.  
  190. CORRECT - See section 12.7.6.1
  191. The RSA key fingerprint allows the dig command to connect to remote systems.
  192. False
  193.  
  194.  
  195. CORRECT - See section 13.3
  196. Which files contain user account information?
  197. /etc/passwd
  198. /etc/shadow
  199.  
  200. CORRECT - See section 13.7.1
  201. The /etc/sudoers file should be edited directly by root using the visudo command.
  202. True
  203.  
  204. CORRECT - See section 13.3.4
  205. Which of the following commands will display the group(s) a user belongs to?
  206. id
  207.  
  208. WRONG - See section 13.3.4
  209. Which of the following commands will display the groups that the user bob belongs to?
  210. group bob
  211. groups -a
  212.  
  213. CORRECT - See section 13.4.1
  214. The /etc/group file follows what structure?
  215. group_name:password_placeholder:GID:user_list
  216.  
  217. CORRECT - See section 13.4.1
  218. A GID is associated with a group name.
  219. True
  220.  
  221. CORRECT - See section 13.7.1
  222. Sudo privileges can be used to specify which user can use the sudo command to execute commands as other users.
  223. True
  224.  
  225. CORRECT - See section 13.7.1
  226. In distributions that do not allow the root user to login directly or via the su command, the installation process automatically configures one user account to be able to use the sudo command to execute commands as if they were executed by the root user.
  227. True
  228.  
  229. CORRECT - See section 13.3.2
  230. The /etc/shadow file contains plain-text passwords.
  231. False
  232.  
  233. WRONG - See section 13.3.3
  234. Which command can be used to view the /etc/passwd file entries?
  235. uppasswd
  236.  
  237. CORRECT - See section 14.13
  238. If a user is deleted, the files and directories that the user owned...
  239. ...will show a UID as the owner, but not user name.
  240.  
  241. CORRECT - See section 14.8.1
  242. Which of the following options for the useradd command allows root to specify supplementary groups the user will be a member of?
  243. -G
  244.  
  245. CORRECT - See section 14.12.1
  246. The usermod command can be used to do all of the following except...
  247. ...change the user's MAX and MIN password settings.
  248.  
  249. CORRECT - See section 14.12.1
  250. Which option for the usermod command can be used to specify a user's group ID (either primary or secondary)?
  251. -g
  252. -G
  253.  
  254. CORRECT - See section 14.10
  255. For non-root users, the passwd command can only be used to change the password of the user running the command.
  256. True
  257.  
  258. CORRECT - See section 14.13
  259. The userdel command will...
  260. ...delete the user account, but leave the user's files by default.
  261.  
  262. WRONG - See section 14.4
  263. The groupmod command can be used to change a group name.
  264. False
  265.  
  266. CORRECT - See section 13.3.4
  267. Which of the following commands can be used to modify a group?
  268. groupmod
  269.  
  270. CORRECT - See section 14.12.1
  271. Which of the following commands, run as root, will prevent the user bob from logging in?
  272. usermod -L bob
  273.  
  274. CORRECT - See section 19.4
  275. What directory contains user's home directories?
  276. /home
  277.  
  278. CORRECT - See section 15.7.3
  279. Which of the following commands sets "other" permissions on file to r-x?
  280. chmod 775 file
  281.  
  282. CORRECT - See section 15.6
  283. The chown command can be used to change the owner and group of a file.
  284. True
  285.  
  286. CORRECT - See section 15.2
  287. The chgrp command can be used to change the owner and group of a file.
  288. False
  289.  
  290. WRONG - See section 15.7
  291. The user sysadmin will be able to read the file because they own it.
  292.  
  293. ----r--r-- 1 sysadmin group 38270 Sep 2 18:49 file
  294. True
  295.  
  296. CORRECT - See section 15.7.2
  297. The user sysadmin will be able to change the permissions of the file because they own it.
  298.  
  299. ----r--r-- 1 sysadmin group 38270 Sep 2 18:49 file
  300. True
  301.  
  302. CORRECT - See section 15.7.3
  303. Octal notation uses the following values for the permissions granted:
  304. r = 4, w = 2, x = 1
  305.  
  306. CORRECT - See section 15.7
  307. A user cannot delete a file if they do not own it.
  308. False
  309.  
  310. CORRECT - See section 15.7
  311. The "execute" permission on a directory allows you to:
  312. Along with read permission to successfully perform ls -l
  313. Along with write permission to successfully create new files
  314. Change to that directory or use it as part of a path
  315.  
  316. CORRECT - See section 15.6
  317. Which option for the chown command can be used to change the owner of a directory and all the files and directories below it?
  318. -R
  319.  
  320. WRONG - See section 15.6
  321. The chown command will only accept one file at a time as an argument.
  322. True
  323.  
  324.  
  325. CORRECT - See section 16.9
  326. The /tmp directory is a temporary directory and will not exist on a system at all times.
  327. False
  328.  
  329. CORRECT - See section 16.7
  330. The "sticky bit" permission...
  331. ...prevents others from removing files they don't own from a common directory.
  332.  
  333. CORRECT - See section 16.3
  334. Which of the following commands will set setuid for /usr/bin/program?
  335. chmod 4755 /usr/bin/program
  336.  
  337. WRONG - See section 16.4
  338. The setgid permission...
  339. ...prevents the group owner of a file from being changed.
  340. ...allows files created in a directory to be owned by the group that owns the directory.
  341.  
  342. CORRECT - See section 16.6
  343. Which of the following commands will set setgid on /shared ?
  344. chmod 2777 /shared
  345.  
  346. CORRECT - See section 16.5
  347. Setting setgid on a directory...
  348. ...will set the group owner of all files created in the directory to the group owner of the directory.
  349.  
  350. CORRECT - See section 16.8.3
  351. A source and a hard link must be part of the same filesystem.
  352. True
  353.  
  354. CORRECT - See section 16.8.3
  355. Deleting a source file will break an associated symbolic link.
  356. True
  357.  
  358. CORRECT - See section 16.8.3
  359. A source file and a symbolic link must be part of the same file system.
  360. False
  361.  
  362. CORRECT - See section 16.8.1
  363. Which of the following commands would create a hard link, link to file?
  364. ln file link
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement