Linux + Assessment Test
5. Which command in GRUB2 defines the location of the /boot folder to the first partition on the first hard drive on the system? A. set root=hd(0,1) B. set root=hd(1,0) C. set root=hd(1,1) D. set root=hd(0,0) E. set root=first
A. GRUB2 identifies the hard drives starting at 0, but the partitions start at 1, so the first partition on the first hard drive would be 0,1 and option A is correct.
15. What drive and partition does the raw device file /dev/sdb1 reference? A. The first partition on the second SCSI storage device B. The second partition on the first SCSI storage device C. The first partition on the second PATA storage device D. The second partition on the first PATA storage device E. The second partition on the second SATA storage device
A. Option A is the correct answer because Linux uses the /dev/sdxx format for SCSI and SATA raw devices. The device is represented by a letter, starting with a, and the partition is represented by a number, starting at 1. So /dev/sdb1 references the first partition on the second SCSI or SATA device.
19. What tool should you use to install a .deb package file? A. dpkg B. tar C. gcc D. rpm E. gzip
A. The dpkg program is used for installing and removing Debian-based packages that use the .deb file format, so option A is correct.
28. What command do you use to display entries in the systemd-journald journal? A. journalctl B. syslogd C. klogd D. systemd-journald E. vi
A. The systemd-journald application uses its own binary file format for the journal file and requires the journalctl file to read it, so option A is correct.
12. What systemd command allows you to view and change the time, date, and time zone? A. timedatectl B. localectl C. date D. time E. locale
A. The timedatectl program is part of the systemd package and allows you to both view and change the current time, date, and time zone for the Linux system, so option A is correct.
46. If you do not tack on the -m option with an argument to the git commit command, what will happen? A. The command will throw an error message and fail. B. The commit will take place, but no tracking will occur. C. You are placed in an editor for the COMMIT_EDITMSG file. D. Your commit will fail, and the file is removed from the index. E. Nothing. This is an optional switch.
C. If the -m option with an argument is not tacked onto the git commit command, you are placed into the vim editor to edit the COMMIT_EDITMSG file. Thus, option C is the correct answer.
27. What command can you use to display new entries in a log file in real time as they occur? A. head B. tail C. tail -f D. head -f E. vi
C. The -f option of the tail command displays new additions to a file in real time, so option C is correct.
38. What directory contains configuration information for the X Windows System in Linux? A. /dev B. /proc C. /etc/X11 D. /sys E. /proc/interrupts
C. The /etc/X11 directory contains configuration files used by both the X.org and XFree86 applications for controlling the X Windows graphical environment on the Linux system, so option C is correct.
53. What file should you place console and terminal file names into to prevent users from logging into the Linux system as the root user account from those locations? A. /etc/cron.deny B. /etc/hosts.deny C. /etc/securetty D. /etc/login.warn E. /etc/motd
C. The /etc/securetty file provides a list of locations from which users can't log in using the root user account, so option C is correct.
29. The /etc/services file may be used by firewalls for what purpose? A. To designate what remote services to block B. To store their ACL rules C. To map a service name to a port and protocol D. To determine if the port can be accessed E. To designate what local services can send out packets
C. The /etc/services file may be used by a firewall, such as UFW, to map a particular service name to its port and protocol. Thus, option C is the correct answer.
52. What type of hypervisor is the Oracle VirtualBox application? A. PaaS B. SaaS C. Type II D. Type I E. Private
C. The Oracle VirtualBox hypervisor installs on top of a host operating system, making it a Type II hypervisor, so option C is correct.
1. What software package allows a Linux server to share folders and printers with Windows and Mac clients? A. Postfix B. Apache C. Samba D. Kerberos E. Docker
C. The Samba software package allows Linux servers and clients to communicate with Windows and Mac clients or servers using the Microsoft SMB protocol, so option C is correct.
43. What does placing an ampersand sign (&) after a command on the command-line do? A. Disconnects the command from the console session B. Schedules the command to run later C. Runs the command in background mode D. Redirects the output to another command E. Redirects the output to a file
C. The ampersand sign (&) tells the shell to run the specified command in background mode in the console session, so option C is correct.
54. What Linux program logs user file and directory access? A. chroot B. LUKS C. auditd D. klist E. kinit
C. The auditd program monitors system activity, including user file and directory access, and logs events based on rules you create. Thus, option C is correct.
41. Which Bash shell script command allows you to iterate through a series of data until the data is complete? A. if B. case C. for D. exit E. $()
C. The for command allows you to iterate through a series of data one by one until the data set is exhausted, so option C is correct.
6. If you see read or write errors appear in the system log, what tool should you use to correct any bad sections of the hard drive? A. mount B. unmount C. fsck D. dmesg E. mkinitrd
C. The fsck program can perform a filesystem check and repair multiple types of filesystems on partitions, so option C is correct.
16. What tool creates a logical volume from multiple physical partitions? A. mkfs B. pvcreate C. lvcreate D. fdisk E. vgcreate
C. The lvcreate program creates a logical volume from multiple partitions that you can use as a single logical device to build a file system and mount it to the virtual directory, so option C is correct.
35. Annika puts the file line PS1="My Prompt: " into her account's $HOME/.bash_profile file. This setting changes her prompt the next time she logs into the system. However, when she starts a subshell, it is not working properly. What does Annika need to do to fix this issue? A. Add the file line to the $HOME/.profile file instead. B. Nothing. A user's prompt cannot be changed in a subshell. C. Add export prior to PS1 on the same line in the file. D. Change her default shell to /bin/dash for this to work. E. Change the last field in her password record to /sbin/false.
C. The problem is directly related to a missing export command prior to the PS1="My Prompt: " in Annika's environment file. When this environment variable is exported and when it is set, it will be set in any started subshells. Thus, option C is the correct answer.
33. What command-line command allows you to view the applications currently running on the Linux system? A. lsof B. kill C. ps D. w E. nice
C. The ps command with the proper options displays the active applications running on the Linux system, so option C is correct.
23. What special bit should you set to prevent users from deleting shared files created by someone else? A. SUID B. GUID C. Sticky bit D. Read E. Write
C. The sticky bit assigned to a directory restricts all of the files in that directory so that only the file owner can delete the file, even if a user account is in the group that has write permissions, so option C is correct.
30. Which of the following is true about netfilter? (Choose all that apply.) A. It is used by firewalld B. It is used by UFW. C. It provides code hooks into the Linux kernel for firewall technologies to use. D. It is used by iptables. E. It provides firewall services without the need for other applications.
A, B, C, D. Used by firewalld, UFW, and iptables, netfilter provides code hooks into the Linux kernel for firewall technologies to use in order to implement fully functional firewall capabilities. Therefore, options A, B, C, and D are all correct answers.
40. Peter is trying to complete his network application, Spider, but is running into a problem with accessing a remote server's files and there are no network problems occurring at this time. He thinks it has something to do with the remote server's ACLs being too restrictive. You need to investigate this issue. Which of the following might you use for troubleshooting this problem? (Choose all that apply.) A. The firewall-cmd command B. The ufw command C. The iptables command D. The getacl command E. The setacl command
A, B, C. Since the problem involves a remote server, you need to investigate the firewall access control lists (ACLs) on both the local and remote systems. Therefore, depending upon their firewall employed, you may use the firewall-cmd, ufw, or iptables command in the troubleshooting process. Thus, options A, B, and C are the correct answers.
50. Which of the following is used in container orchestration? (Choose all that apply.) A. Automated configuration management B. Self-healing C. DevOps D. Agentless monitoring E. Build automation
A, B, D, E. The concepts listed in options A, B, D, and E are all used in container orchestration. While DevOps benefits from container orchestration and often employs it, it is not used within container orchestration. Thus, option C is an incorrect choice.
13. Which of the following files contain user account creation directives used by the useradd command? (Choose all that apply.) A. The /etc/default/useradd file B. The /etc/useradd file C. The /etc/adduser.conf file D. The /etc/login.defs file E. The /etc/login.def file
A, D. The /etc/default/useradd file and /etc/login.defs file are files that contain user account creation directives used by the useradd command. Therefore, options A and D are the correct answers.
31. Which of the following is a measurement of the maximum amount of data that can be transferred over a particular network segment? A. Bandwidth B. Throughput C. Saturation D. Latency E. Routin
A. Bandwidth is a measurement of the maximum data amount that can be transferred between two network points over a period of time. Therefore, option A is the correct answer.
11. What folder contains the time zone template files in Linux? A. /etc/timezone B. /etc/localtime C. /usr/share/zoneinfo D. /usr/share/timezone E. /usr/share/localtime
C. Both Debian-based and Red Hat-based Linux distributions store the time zone template files in the /usr/share/zoneinfo folder, so option C is correct.
26. Which of the following can override the settings in the ~/.ssh/config file? A. The settings in the /etc/ssh/ssh_config file. B. The ssh utility's command-line options. C. You cannot override the settings in this file. D. The settings in the /etc/ssh/sshd_config file. E. The settings in the sshd daemon's configuration file.
B. The settings within the ~/.ssh/config file can be overridden by various ssh utility options provided at the command line. Therefore, option B is the correct answer.
48. "A networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs" describes which of the following? A. Thick provisioning B. Thin provisioning C. SDN D. NAT E. VLAN
C. A software-defined network (SDN) is a networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs. Thus, option C is the correct answer.
17. Which of the following can be used as backup utilities? (Choose all that apply.) A. The gzip utility B. The zip utility C. The tar utility D. The rsync utility E. The dd utility
B, C, D, E. The zip, tar, rsync, and dd utilities all can be used to create data backups. Therefore, options B, C, D, and E are correct answers. The gzip utility can be used after a backup is created or employed through tar options to compress a backup, so option A is the only wrong choice.
4. Which of the following are stream editors? (Choose all that apply.) A. vim B. sed C. awk D. gawk E. nano
B, C, D. The sed, awk, and gawk utilities are all stream editors. Therefore, options B, C, and D are correct.
49. Your company decides it needs an orchestration system (also called an engine). Which of the following is one you could choose? (Choose all that apply.) A. Mesos B. Kubernetes C. Splunk D. Swarm E. AWS
B, D. Only Kubernetes and Swarm are orchestration systems. Therefore, options B and D are correct answers. Mesos needs Marathon to implement an orchestration engine, so option A is a wrong answer.
37. Which directories contain dynamic files that display kernel and system information? (Choose two.) A. /dev B. /proc C. /etc D. /sys E. /dev/mapper
B, D. The Linux kernel uses the /proc and /sys directories to produce dynamic files that contain information about the kernel and system, so options B and D are correct. The /dev folder contains files for communicating with devices, not kernel and system information, so option A is incorrect.
34. What command-line commands allow you to send process signals to running applications? (Choose two.) A. renice B. pkill C. nice D. kill E. pgrep
B, D. The pkill and kill commands allow you to send Linux process signals to running applications, so options B and D are correct.
18. A system administrator has created a backup archive and transferred the file to another system across the network. Which utilities can be used to check the archive files integrity? (Choose all that apply.) A. The rsync utility B. The md5sum utility C. The sftp utility D. The scp utility E. The sha512sum utility
B, E. Both the md5sum and sha512sum utilities produce hashes on files, which can be compared to determine if file corruption occurred, such as when transferring a file over the network. Therefore, options B and E are the correct answers.
42. Which environment variable allows you to retrieve the numeric user ID value for the user account running a shell script? A. $USER B. $UID C. $BASH D. $HOME E. $1
B. The $UID environment variable contains the numeric user ID value of the user account running the shell script, so option B is correct.
56. To copy a directory with the cp command, which option do you need to use? A. -i B. -R C. -v D. -u E. -f
B. The -R option used with the cp command allows you to copy a directory's contents. You can also employ the -r or --recursive options to achieve the same results. Therefore, option B is the correct answer.
21. The lsmod utility provides the same information as what other utility or file(s)? A. The modinfo utility B. The /proc/modules file C. The /etc/modules.conf file D. The insmod utility E. The /run/modprobe.d/*.conf files
B. The /proc/modules file has the same information that is displayed by the lsmod utility (though the lsmod utility formats it much nicer). Therefore, option B is the correct answer.
9. The Cinnamon desktop environment uses which windows manager? A. Mutter B. Muffin C. Nemo D. Dolphin E. LightDM
B. The Cinnamon desktop environment uses the Muffin windows manager. Therefore, option B is the correct answer.
24. What command can you use to change the owner assigned to a file? A. chmod B. chown C. chage D. ulimit E. chgrp
B. The chown command allows you to set both the owner and group assigned to a file, so option B is correct.
44. When will the cron table entry 0 0 1 * * myscript run the specified command? A. At 1 a.m. every day B. At midnight on the first day of every month C. At midnight on the first day of every week D. At 1 p.m. every day E. At midnight every day
B. The cron table format specifies the times to run the script by minute, hour, day of month, month, and day of week. Thus the format 0 0 1 * * will run the command at 00:00 (midnight) on the first day of the month for every month. That makes option B correct.
7. The init program is started on a Linux system and has a process ID number. What typically is that process's ID number? A. 0 B. 1 C. 2 D. 10 E. Unknown
B. The init program is typically started immediately after the Linux system has traversed the boot process, and it has a process ID (PID) number of 1. Therefore, option B is the correct answer.
47. At a virtualization conference, you overhear someone talking about using blobs on their cloud-based virtualization service. Which virtualization service are they using? A. Amazon Web Services B. KVM C. Digital Ocean D. GitHub E. Microsoft Azure
E. The Microsoft Azure cloud-based virtualization service provides blobs, which are large unstructured data storage that offered over the Internet and can be manipulated with .NET code. Therefore, option E is the correct answer.
22. Which utility should be used to remove a module along with any dependent modules? A. The rmmod utility B. The modinfo utility C. The cut utility D. The depmod utility E. The modprobe utility
E. The modprobe utility along with its -r switch is the utility to employ for removing (unloading) a kernel module along with any of its dependencies. Therefore, option E is the correct answer. The rmmod utility will remove a kernel module but not any of its dependencies.
14. You need to display the various quotas on all your filesystems employing quota limits. Which of the following commands should you use? A. edquota -t B. quotaon -a C. quotacheck -cu D. quotacheck -cg E. repquota -a
E. The repquota -a command will display the various quotas on all your filesystems employing quota limits. Therefore, option E is the correct answer.
8. You need to determine the default target of a systemd system. Which of the following commands should you use? A. grep initdefault /etc/inittab B. runlevel C. systemctl is-enabled D. systemd get-target E. systemctl get-default
E. The systemctl get-default command will display a systemd system's default target. Therefore, option E is the correct answer.
32. Which tool will allow you to view disk I/O specific to swapping? A. ipcs -m B. cat /proc/meminfo C. free D. swapon -s E. vmstat
E. The vmstat utility provides a lot of memory statistics, including disk I/O specific to swapping. Therefore, option E is the correct answer.
45. Which of the following packages will provide you with the utilities to set up Git VCS on a system? A. git-vcs B. GitHub C. gitlab D. Bitbucket E. git
E. This git package provides utilities to set up Git VCS on a system, so option E is the correct answer.
25. The directory contains the various PAM configuration files. A. The /etc/pam/ directory B. The /etc/pam_modules/ directory C. The /etc/modules/ directory D. The /etc/pam.d/ directory E. The /etc/pam_modules.d/ directory
D. The /etc/pam.d/ directory contains the various PAM configuration files. Therefore, option D is the correct answer.
51. What type of cloud service provides the full application environment so that everyone on the Internet can run it? A. PaaS B. Private C. Public D. SaaS E. Hybrid
D. The Software as a Service (SaaS) cloud service type provides full applications, allowing anyone to connect to your application, so option D is correct.
3. The cat -n File.txt command is entered at the command line. What will be the result? A. The text file File.txt will be displayed. B. The text file File.txt will be displayed along with any special hidden characters in the file. C. The text file File.txt will be displayed along with any special symbols representing end-of-line characters. D. The text file File.txt will be displayed along with line numbers. E. The text file File.txt will be displayed in reverse order.
D. The cat -n File.txt command will display the File.txt text file along with line numbers. Therefore, option D is correct.
55. You've moved your present working directory to a new location in the Linux virtual directory structure and need to go back to the previous directory, where you were just located. Which command should you employ? A. cd B. exit C. cd ~ D. cd - E. return
D. The cd - command will return your process to its previous directory in the virtual directory system, so option D is the correct answer.
20. What tool do you use to install a .rpm package file? A. dpkg B. tar C. gcc D. rpm E. gzip
D. The rpm program is used for installing and removing Red Hat-based packages that use the .rpm file format, so option D is correct.
39. How would you fix a "mount point does not exist" problem? A. Employ the fsck utility to fix the bad disk sector. B. Employ the badblocks utility to fix the bad disk sector. C. Use super user privileges, if needed, and create the directory via the vgchange command. D. Use super user privileges, if needed, and create the directory via the mkdir command. E. Use super user privileges, if needed, and create the directory via the mountpoint command.
D. This problem concerns a missing directory. Therefore, to fix it, use super user privileges, if needed, and create the directory via the mkdir command. Thus, option D is the correct answer.
36. A user, who is not the owner or a group member of a particular directory, attempts to use the ls command on the directory and gets a permission error. What does this mean? A. The directory does not have display (d) set for other permissions. B. The directory does not have execute (x) set for other permissions. C. The directory does not have write (w) set for other permissions. D. The directory does not have list (l) set for other permissions. E. The directory does not have read (r) set for other permissions.
E. In order for a user to list files in a directory, the directory needs to have read (r) set for other permissions if the user is not the directory's owner or does not belong to the directory's set group. Therefore, option E is the correct answer.
10. Your X11 session has become hung. What keystrokes do you use to restart the session? A. Ctrl+C B. Ctrl+Z C. Ctrl+Q D. Ctrl+Alt+Delete E. Ctrl+Alt+Backspace
E. The Ctrl+Alt+Backspace will kill your X11 session and then restart it, putting you at the login screen (display manager.) Therefore, option E is the correct answer.
2. Which software package allows developers to deploy applications using the exact same environment in which they were developed? A. Postfix B. Apache C. Samba D. Kerberos E. Docker
E. The Docker package provides a method for developers to capture the entire development environment for an application and deploy it into a production environment as a container, so option E is correct.