Linux+ Flashcards

1
Q
1. Which bash configuration files are used for non-login bash shell sessions? (Choose two.)
    A) /etc/profile
    B) /etc/bashrc
    C) ~/.bashrc
    D) ~/.profile
    E) ~/.bash_profile
A
  1. B and C are correct. Both /etc/bashrc and ~/.bashrc are used to configure non-login shell sessions, although other files may be used on some distributions.

A, D, and E are incorrect. The /etc/profile, ~/.profile, and ~/.bash_profile files are used to configure login shell sessions. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
2. Choose the one’s that run at 4PM? (Choose two.)
    A) at 4PM
    B) at noon+4
    C) at 16
    D) at teatime
    E) at “4 o’clock”
A
  1. A and D are correct. Users can run at 4PM, at 16:00, or at teatime to schedule a job to run at 4PM.

B, C, and E are incorrect. Therse other forms of running at will return a syntax error message. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
3. You’ve opened the /var/opt/myapp/settings.txt file in the vi editor. You need to enter new text into the file. Which key will switch a user into Insert mode from Normal or “Command” mode? 
    A) i
    B) w
    C) z
    D) r
    E) x
A
  1. A is correct. Press the Insert or i key to enter Insert mode in the vi editor.

B, C, D, and E are incorrect. The ESC key is used to return to Normal (Command) mode from Insert mode in the vi editor. The a key is used to append text after the cursor. The o key opens a new line below before allowing for text to be inserted. The r key is used to replace a single character, and the x key is used by the vi editor to delete a single character. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
4. YAML files used to configure network cards to use DHCP or setup Static IP addressing can be found where?
A. /etc/X11
B. /etc/yum
C. /etc/yum.repos.d
D. /etc/netplan
A
  1. D is correct. Save a network configuration inside the /etc/netplan/config.yaml file to automate the configuration at boot time.

A, B, and C are incorrect. The /etc/X11 file is for the X-Window GUI setups, and the /etc/yum and /etc/yum.repos.d files point to software installation repositories. (Topic 1. Hardware and System Configuration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
5. To create a new directory in a user's home directory named MyFiles, use the following command to do this?
A. mkdir ~/myfiles
B. mkdir ~/MyFiles
C. md ~/myFiles
D. mkdir ~ MyFiles
E. md ~/MyFiles
A
  1. B is correct. The mkdir command is used to create new directories in the file system where ì~ì stands for the userís home directory (in this case, /home/user/Myfiles or ~/MyFiles).

A is incorrect because it uses the wrong case for the directory name. C and E are incorrect because they use the incorrect command for creating new directories (md). D is incorrect because it omits the (/) character after the tilde. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
6. The sealert utility is used to determine that a user cannot access a file.  Which command would aid in troubleshooting by showing access settings?
A. ls -s
B. ls -Z
C. ls -l
D. restorecon
E. aa-disable
A
  1. B is correct. Running ls -Z will allow the user to see the current SELinux settings and determine whether or not it need be changed.

A, C, D, and E are incorrect. Neither the ls -s and ls -l commands will list any file SELinux information, instead only showing file sizes, and a ìlong listingî, respectively. The restorecon command fixes and repairs SELinux labels. The aa-disable command is used to disable AppArmor, not SELinux. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
7. Which vi command-line mode commands can be used to save changes to the current file being edited and close the vi editor? (Choose three.)
A. ZZ
B. :wq
C. :q
D. :q!
E. :x
A
  1. A, B, and E are correct. The ZZ, :x and :wq commands will save any changes to the current file and then close the vi editor.

C, and D are incorrect. The :q command will close the current file and exit the editor without saving changes. The :q! command will discard any changes made to the current file, close it, and then exit the editor. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
8. Change the permissions of a file named widgets.odt such that the file owner can edit the file, but no other users on the system will be allowed to view or modify it. Which command will do this?
A. chmod 660 widgets.odt
B. chmod 640 widgets.odt
C. chmod 777 widgets.odt
D. chmod 600 widgets.odt
A
  1. D is correct. The chmod 600 widgets.odt command grants the owner rw- permissions, but takes away permissions from all other users.

A is incorrect because it allows the file owner to edit the file, but also grants read and write access to the group. B is incorrect because it grants the group the read (r) permission. C is incorrect because it grants the owner, group, and others all permissions to the file. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
9. Change the permissions of a file named projectx.odt such that the file owner can edit the file, users who are members of the group that owns the file can view and edit it, and users who are not owners and don't belong to the owning group cannot view or modify it. Which command will do this?
A. chmod 660 projectx.odt
B. chmod 640 projectx.odt
C. chmod 777 projectx.odt
D. chmod 644 projectx.odt
A
  1. A is correct. The chmod 660 projectx.odt command grants the owner rw- permissions, the group rw- permissions, and others — permissions.

B is incorrect because it fails to grant the group the write (w) permission. C is incorrect because it grants the owner, group, and others all permissions to the file. D is incorrect because it fails to grant the group the write (w) permission and it grants others read (r–) permission to the file. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
10. Which usermod command options must be used to add user accounts as members of a secondary group? (Choose two.)
A. -a
B. -s
C. -g
D. -p
E. -G
A
  1. A and E are correct. The usermod -aG command adds the users you specify as members of the specified group(s).

B, C, and D are incorrect. The -s option is used by the usermod command to define the login shell that the user will run. The -g option assigns the user is primary group. The -p option changes the password assigned to the user. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
11. Which control structure processes over and over as long as a specified condition evaluates to false?
A. while
B. until
C. for
D. case
A
  1. B is correct. An until loop runs over and over as long as the condition is false. As soon as the condition is true, it stops.

A, C, and D are incorrect. A while loop executes over and over until a specified condition is no longer true. A for loop processes a specific number of times. A case statement is not a looping structure. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
12. For designing the implementation of a new Linux server in the companyís network, the server will function as an internal file and print server for the organization. Employees will save their work-related files in shared storage locations on the server, and print jobs for shared printers will be managed by the server as well. What services should be included in the specifications? (Choose two.)
A. Apache
B. MySQL
C. Samba
D. Telnet
E. Pure-FTP
F. CUPS
A
  1. C and F are correct. The Samba service provides file sharing. CUPS is used to manage printing.

A, B, D, and E are incorrect. The Apache web server is frequently implemented on Linux in conjunction with the MySQL database server to develop web-based applications. Telnet is an older service that was formerly used for remote access. Pure-FTP provides an FTP service. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
13. This process takes over and kills processes which use too much memory because they score too high under this process monitoring system? 
A. BOMB
B. BOM
C. KaBOOM
D. BOOM
E. OOM
A
  1. E is correct. The Out of Memory Killer watches for processes that use too much memory and selects them for killing when the system has a serious memory shortage.
    A, B, C, and D are incorrect and are non-existent Linux tools, but the names sure sound cool :-). (Topic 4. Linux Troubleshooting and Diagnostics)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
14. Which tools can be used to check for open network ports? (Choose two.)
A. nmap
B. lsof
C. pwconv
D. ssh
E. cpio
A
  1. A and B are correct. Either nmap -sT -p 1-1024 10.0.0.* is used to scan for open ports between 1-1024, and lsof -i is also used to scan for open network ports.

C, D, and E are incorrect. The pwconv command is used to create the /etc/shadow file from the /etc/passwd file. The ssh command is used to make secure remote login connections. The cpio command is used to create tape backups.. . (Topic 4. Linux Troubleshooting and Diagnostics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
15. To insert a new kernel module into a Linux system that has no dependencies, which tool is best to use to utilize the module? 
A. dmesg
B. modinfo
C. insmod
D. depmod
E. lsmod
A
  1. C is correct. Use insmod to insert a module.

A, B, D, and E are incorrect. The lsmod command shows a list of currently installed modules. The dmesg program shows hardware found during bootup. The depmod command looks for module dependencies and updates the modules.dep file. And, the modinfo command provides the user info about a module. (Topic 1. Hardware and System Configuration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
16. Which of the following commands is used to find the domain's mail server?
A. dig
B. ping
C. traceroute
D. route
A
  1. A is correct. A systems administrator could run dig jordanteam.com MX and list the location of the mail server.

B, C, and D are incorrect. The ping command is used to test networks, and traceroute will list the routers used for a packet to reach its destination. The route command is used to define or display the default gateway. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
17. Which command updates every few seconds displaying the routers that packets use to reach their destination?
A. mtr
B. traceroute
C. tracert
D. iftop
E. top
A
  1. A is correct. Use the mtr command to visualize the routes a packet takes to reach its destination.

B, C, D, and E are incorrect. The traceroute command is similar to mtr, but is command line, and does not operate periodically. The tracert command is the same as traceroute but works on the Windows Operating System. The top command updates periodically, and shows process activity. The iftop command updates periodically displaying network traffic. (Topic 4. Linux Troubleshooting and Diagnostics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
18. When using local authentication on a Linux system, which file contains the passwords for the user accounts?
A. /etc/passwd
B. /etc/group
C. /etc/gshadow
D. /etc/shadow
A
  1. D is correct. The /etc/shadow file contains the encrypted passwords for user accounts.

A, B, and C are incorrect. The /etc/passwd file contains the user accounts and user IDs. The /etc/group file is used for local group definitions.. The /etc/gshadow file contains passwords for thegroups. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
19. Consider the following entry from the /etc/passwd file: algreer:x:1001:100:Albert Greer:/home/algreer:/bin/bash. What user ID (UID) has been assigned to this user account?
A. algreer
B. 1001
C. 100
D. Albert Greer
A
  1. B is correct. The third field in each user entry in /etc/passwd specifies the userís ID number (UID). In this case, itís 1001.

A is incorrect because it specifies the username. C is incorrect because it specifies the group ID (GID) of the userís primary group. D is incorrect because it specifies the userís full name. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
20. Consider the following entry from the /etc/shadow file: kmorgan:$2a$05$KL1DbTBqpSEMiL.2FoI3ue4bdyR.eL6GMKs7MU6.nZl5SCC7/REUS:15043:1:60:7:5::. In how many days will this account be disabled after the user's password has expired?
A. One day
B. Seven days
C. Five days
D. Null value (never)
A
  1. C is correct. The seventh field in each record in /etc/shadow specifies the number of days to wait after a password has expired to disable the account.
    A is incorrect because it specifies the minimum number of days (one) required before a password can be changed.
    B is incorrect because it specifies the number of days prior to password expiration before the user will be warned of the pending expiration.
    D is incorrect because it is assigned to the eighth field, which specifies the number of days since January 1, 1970, after which the account will be disabled. (Topic 2. Systems Operation and Maintenance)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
21. Which of the below contain files that populate new user's home directories created with useradd?
A. /etc/login.defs
B. /etc/default/useradd
C. /etc/skel
D. /etc/default/grub
A
  1. C is correct. The /etc/skel directory contains files (usually startup scripts, like .bashrc) that populate a new userís home directory when created with useradd.
    A, B, and D are incorrect. The /etc/default/useradd file contains defaults used by the useradd utility, e.g. userid and default shell. The /etc/default/grub file contains booting defaults. The /etc/login.defs file defines the locations of new userís mail directories, etc. (Topic 2. Systems Operation and Maintenance)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
  1. Create a new account for a user named Ian Mausi on a Linux system. Specify a username of imausi, a full name of Ian Mausi, a default shell of /bin/bash, and that a home directory be created. Which command will do this?
    A. useradd -c “Ian Mausi” -m -s “/bin/bash” imausi
    B. useradd -c “Ian Mausi” -m -s “/bin/bash” -u imausi
    C. usermod -c “Ian Mausi” -m -s “/bin/bash” imausi
    D. useradd -c “Ian Mausi” -s “/bin/bash” imausi
A
  1. A is correct. The useradd -c “Ian Mausi” -m -s “/bin/bash” imausi command creates a new user account for a user named Ian Mausi with a username of imausi, a full name of Ian Mausi, a default shell of /bin/bash, and a home directory.

B is incorrect because it uses incorrect syntax for the useradd command, where -u is followed by a userid number. C is incorrect because it uses an incorrect command (usermod). D is incorrect because it omits the -m option, which is required to create a home directory. (Topic 2. Systems Operation and Maintenance)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
23. Which file keeps a list of intentionally untracked files that git should ignore?
A. .gitnot
B. gitnot
C. .gitignore
D. .git
A
  1. C is correct. The .gitignore file keeps a list of files that should be ignored by the git command.

A and B are incorrect because there are no such files as .gitnot or gitnot. D is incorrect because .git is a directory that contains the repository for the project.. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
24. Command Substitution, which allows a command to run within a command is performed with which operators? (Choose 2)
A. ` `
B. $( )
C. ë ë
D. ì  ì
E. ${ }
A
  1. A and and B are correct. Users can use the backticks, e.g. echo Today is date, or dollar sign & parentheses, e.g. echo Today is $(date). The output of the date command will be the input to the echo command.

C, D, and E are incorrect. The single quotes make all characters literal. The “double quotes” make all characters literal except for the \, $, and ` (backtick), (with some exceptions to !, @, and * that are outside the scope of the exam). Dollar with curly braces, ${ }, are used to dereference a variable. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q
  1. An Administrator runs mount /dev/sdb2 /external, and realizes they have made a mistake because a filesystem was already mounted to /external. What happened to the files that were initially mounted onto /external?
    A. The files are destroyed and can only be recovered from backup tape
    B. Linux does not allow for a filesystem to be mounted onto another
    C. The files are temporarily merged with the new filesystem
    D. Nothing. When the administrator runs umount /dev/sdb2, the files will reappear unharmed
A
  1. D is correct. When the administrator runs umount /dev/sdb2, the files will reappear unharmed

A, B, and C are incorrect. (Topic 1. Hardware and System Configuration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q
26. A script that will require the end user to enter the name of their supervisor will use which of the following lines to input the user's response into a variable named SUP?
A. read SUP
B. input SUP
C. prompt SUP
D. query SUP
A
  1. A is correct. The read command is used to pause the script and prompt the user to provide some type of input, which is assigned to the specified variable.

B, C, and D are incorrect. The input, prompt, and query commands cannot be used to read user input, and are distractors. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q
  1. When a new user attempts to run a script while in their home directory using the
    ./runme.sh command from the shell prompt, they see the following error: bash: ./runme.sh: Permission denied. Which resolution will fix this issue?
    A. Copy the file to the ~/bin directory.
    B. Add the home directory to the PATH environment variable.
    C. Enter chmod u+x runme.sh at the shell prompt.
    D. Change the sha-bang line of the script to #!/bin/sh
A
  1. C is correct. The error shown is caused by not having the execute permission set for the user trying to run the script. The chmod u+x runme.sh command will allow the user who owns the file to run it.

A and B are incorrect because they resolve path-related problems, which are not an issue in this scenario. D is incorrect because it changes the command interpreter to the /bin/sh (Bourne) shell, which is not necessary in this scenario. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q
  1. Which of the following will make for the fastest restore, and fewest number of tapes to restore, assuming the system fails shortly after the Friday backup completes?
    Key: F=Full, I=Incremental, D=Differential?
    A. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-F2
    B. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-I2
    C. Mon-F1, Tue-D1, Wed-D2, Thu-D3, Fri-D4
    D. Mon-F1, Tue-I1, Wed-I2, Thu-I3, Fri-I4
A
  1. A is correct. If the system fails after the backup completes on Friday, the only tape required to fully restore would be F2 (Full backup, Number 2 made on Friday).

B, C, and D are incorrect. B would require 3 tapes to recover in this order, Full-1, Differential 2, and Incremental 2. C would require 2 tapes to recover in this order, Full 1, and Differential 4. Case D would require all tapes to recover in the order of F1, I1, I2, I3, and I4. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q
29. Which of the following commands can convert a SHELL variable to an ENVIRONMENT variable?
A. env
B. export
C. set
D. chmod
A
  1. B is correct. Running export VAR1 will convert VAR1 from a SHELL variable to an ENVIRONMENT variable.

A, C, and D are incorrect. The env command will display all of the ENVIRONMENT variables defined. The set command will display all of the SHELL variables defined. The chmod command can change read, write, and execute permissions on files. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q
30. Which command would an Administrator run to generate a sequence of numbers that starts at 1, increments by 1, and stops at 100? (Choose two.)
A. for i in `seq 1 5 100`
B. for i in `seq 100`
C. for i in `seq 1 1 100`
D. for i in `seq 1-100`
E. for i in `seq 1..100`
A
  1. B and C are correct. When an Administrator specifies a single value with seq, the sequence starts at one, increments by one, and ends at the specified value. If three values are specified, the sequence starts at the first value, increments by the second value, and ends at the third value.

A is incorrect because it increments by five instead of one. D and E are incorrect because they use incorrect syntax for the seq command. (Topic 5. Automation and Scripting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q
31. Which command can uncover a remote user's login name and password when they connect using telnet or ftp?
A. dig
B. nslookup
C. tcpdump
D. ip
A
  1. C is correct. The tcpdump command monitors network traffic and can display unencrypted login names and passwords.

A, B, and D are incorrect. The dig and nslookup commands list the IP addresses that domain names belong to. The ip command is used to define and setup network devices. (Topic 4. Linux Troubleshooting and Diagnostics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q
32. Which protocols encrypt the network traffic? (Choose two.)
A. SSH
B. FTP
C. TELNET
D. HTTPS
E. FINGER
A
  1. A and D are correct. SSH and HTTPS encrypt traffic traveling along the network.

B, C, and E are incorrect. FTP, TELNET, and FINGER communicate across the network using unencrypted data, and should be disabled for best security. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q
33. Which of the below is NOT a Single Sign-On system? 
A. RADIUS
B. KERBEROS
C. TACACS+
D. CIRCUMFERENCE
E. LDAP
A
  1. D is correct. There is no single sign-on system referred to as CIRCUMFERENCE.

A, B, C, and E are incorrect. Each of these are single sign-on systems which allow a user to use a single digital identity across multiple domains. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q
34. Consider the following IP address: 172.17.8.10/22. Which subnet mask is assigned to this address?
A. 255.255.252.0
B. 255.255.0.0
C. 255.255.255.0
D. 255.255.255.252
A
  1. A is correct. The /22 prefix length indicates the first two octets of the subnet mask (16 bits) are populated plus six additional bits in the third octet.

B, C, and D are incorrect. The prefix length for 255.255.0.0 would be /16. The prefix length for 255.255.255.0 would be /24. The prefix length for 255.255.255.252 would be /30. (Topic 4. Linux Troubleshooting and Diagnostics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q
  1. Which command would assign the ens32 interface an IP address of 172.17.8.1 with a subnet mask of 255.255.0.0 and a broadcast address of 172.17.255.255?
    A. ip addr set ens32 172.17.8.1/255.255.0.0 bcast 172.17.255.255
    B. ip addr 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
    C. ip addr set 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
    D. ip addr add 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
A
  1. D is correct. This command will assign the ens32 interface an IP address of 172.17.8.1 with a subnet mask of 255.255.0.0, and a broadcast address of 172.17.255.255.

A, B and C are incorrect because they use incorrect parameters for setting the subnet mask and broadcast address. (Topic 4. Linux Troubleshooting and Diagnostics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q
36. Which directive in /etc/sysconfig/network/ifcfg-eth0 is used to specify whether the interface is automatically enabled when the system is booted?
A. STARTMODE
B. BOOTPROTO
C. IPADDR
D. USERCONTROL
A
  1. A is correct. STARTMODE determines whether the interface is started automatically at system boot or must be manually enabled.

B, C, and D are incorrect. The BOOTPROTO parameter can be set to a value of STATIC to use static IP address assignments or to DHCP to configure dynamic IP addressing. IPADDR assigns an IP address to the interface but only works if BOOTPROTO is set to STATIC. USERCONTROL determines whether standard user accounts are allowed to manage the interface. (Topic 4. Linux Troubleshooting and Diagnostics)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q
37. Which system keeps one NIC sleeping, and awakens when another NIC fails?
A. Active-Passive
B. Active-Active
C. Load Balancing
D. Aggregation
A
  1. A is correct. Active-Passive clusters reserves a passive NIC that becomes active when another NIC fails.

B, C, and D are incorrect because Active-Active clusters systems keep all NICs active and running and are designed primarily for Load Balancing and load Aggregation. C and is incorrect because it is used to configure the systemís hostname. (Topic 1. Hardware and System Configuration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q
38. For security reasons, a Linux system should resolve hostnames using the DNS server before trying to resolve them using the /etc/hosts file. Which file is reconfigured to change the name resolver order?
A. /etc/resolv.conf
B. /etc/sysconfig/network/ifcfg-eth0
C. /etc/nsswitch.conf
D. /etc/sysconfig/services
A
  1. C is correct. Use /etc/nsswitch.conf (name service switch) to define the order in which services will be used for name resolution.

A is incorrect because it is used to configure the IP address of the DNS server but does not configure the name service order. B is incorrect because it is used to configure IP addressing information but does not contain name resolution information. D is incorrect because it is used to configure how services will behave after they are updated. (Topic 1. Hardware and System Configuration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q
39. The /etc/sudoers file on your Linux system is configured by default such that users must supply the root password when using sudo. Which BEST commands are used to modify the /etc/sudoers file? (Choose two.)
A. gedit
B. vi
C. notepad
D. sudoedit
E. visudo
A
  1. D and E are correct. Use visudo or sudoedit /etc/sudoers to modify the /etc/sudoers file securely.

A, B, and C are incorrect. The gedit and vi commands could be used to edit /etc/sudoers as root, but is insecure as multiple users may be editing the file simultaneously, causing changes to be lost. The notepad command is an editor used with Microsoft Windows. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q
40. Which setting made in the proper file in the /etc/pam.d/ directory tracks login attempts and lockout users after multiple attempts?
A. pam_access.so
B. pam_loginuid.so
C. pam_limits.so
D. pam_tally2.so
A
  1. D is correct. Defining pam_tally2.so within proper files under /etc/pam.d/ can lock an account after 3 improper login attempts, for example.

A, B, and C are incorrect. Use pam_access.so for auditing and logging of access control. Use pam_loginuid.so to assist in login auditing as well. Use pam_limits.so to take advantage of ulimit features. (Topic 3. Security)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q
41. To secure the sshd service running on a Linux system from hackers, it is decided to configure it to listen for SSH requests on a port other than the default of 22. Which directive in the /etc/ssh/sshd_config file can do this?
A. Port
B. BindAddress
C. Protocol
D. Tunnel
A
  1. A is correct. The Port directive specifies the port on which the sshd daemon will listen for SSH requests.

B, C, and D are incorrect. The BindAddress directive is used to specify the address on the local machine to be used as the source address of the connection. The Protocol directive specifies the protocol versions SSH should support. The Tunnel directive is used to set up forwarding between the SSH client and the SSH server. (Topic 3. Security)

42
Q
42. You want to write the stdout from the ps command to a file named myprocesses in the /tmp directory without overwriting the existing contents of that file. Which command will do this?
A. ps 3 < /tmp/myprocesses
B. ps 1 > /tmp/myprocesses
C. ps 2 <> /tmp/myprocesses
D. ps 4 >> /tmp/myprocesses
A
  1. D is correct. The ps 4&raquo_space; /tmp/myprocesses command appends the stdout from the ps command to a file named myprocesses in the /tmp directory.

A is incorrect because < attempts to use /tmp/myprocesses as stdin to the ps command. B is incorrect because > will redirect stdout to the file /tmp/myprocesses and overwrite any data within the file. C is incorrect. In some versions of bash <> stands for read-write, and again would overwrite any data within /tmp/myprocesses. (Topic 2. Systems Operation and Maintenance)

43
Q
43. Which Linux runlevel puts the system in multiuser mode as a network server with a command-line interface?
A. 1
B. 2
C. 3
D. 5
A
  1. C is correct. Runlevel 3 puts Linux in multiuser mode with networking services enabled. The command-line interface (CLI) is used.

A, B, and D are incorrect. Runlevel 1 uses a command-line interface and puts the system into single-user mode. Runlevel 2 also uses a command-line interface and runs in multiuser mode; however, the system is setup as a network client. Runlevel 5 runs Linux in multiuser mode with networking services enabled and a graphical user interface. (Topic 2. Systems Operation and Maintenance)

44
Q
44. An Administrator must configure the GRUB2 bootloader such that it will boot the first operating system in the boot menu by default unless an end user manually selects an operating system within the timeout period. Which directive should be set within the /etc/default/grub configuration file to do this?
A. GRUB_DEFAULT=0
B. GRUB_SAVEDDEFAULT=true
C. GRUB_HIDDEN_TIMEOUT_QUIET=true
D. GRUB_CMDLINE_LINUX=saved
A
  1. A is correct. The GRUB_DEFAULT=0 directive causes GRUB2 to use the first menu entry by default, regardless of which operating system was selected on the last boot.

B, C, and D are incorrect. If you set GRUB_SAVEDDEFAULT to true, then GRUB will automatically select the last selected operating system from the menu as the default operating system to be used on the next boot. This parameter could conflict with the GRUB_DEFAULT parameter. Therefore, Administratorís can use either one, but not both. The GRUB_HIDDEN_TIMEOUT_QUIET=true directive causes no countdown timer to be displayed. The GRUB_CMDLINE_LINUX directive is used to pass options to the kernel. (Topic 1. Hardware and System Configuration)

45
Q
45. Which commands will switch a Linux system from a graphical environment to a multi-user text-based environment? (Choose two.)
A. systemctl isolate runlevel3.target
B. systemctl isolate rescue.target
C. systemctl isolate multi-user.target
D. systemctl isolate runlevel5.target
E. systemctl isolate graphical.target
A
  1. A and C are correct. Both systemctl isolate runlevel3.target and systemctl isolate multiuser.target are used to switch the system into a text-based, multiuser environment comparable to runlevel 3 on an init-based system.

B, D, and E are incorrect. To switch to the systemd equivalent of runlevel 5, enter either systemctl isolate runlevel5.target or systemctl isolate graphical.target. The systemctl isolate rescue.target command switches the system to a rescue environment equivalent to runlevel 1. (Topic 2. Systems Operation and Maintenance)

46
Q
46. The Systems Administrator just added a third SATA hard disk drive to the Linux system and needs to create a GPT partition on it. Which command should they use to do this?
A. fdisk /dev/sdb
B. fdisk /dev/sdc
C. fdisk /dev/sd2
D. fdisk /dev/sd3
A
  1. B is correct. To create a GPT partition on the third SATA hard disk in a Linux system, first switch to the root user and enter fdisk /dev/sdc at the shell prompt.

A is incorrect because the fdisk /dev/sdb represents the second SATA hard drive. C and D are incorrect because they are improper hard-drive representation syntax. (Topic 1. Hardware and System Configuration)

47
Q
47. On a Linux system with 16GB of RAM, two additional SATA hard disks (/dev/sdb and /dev/sdc) are added to the system, and created a partition on each one. The partitions are defined as LVM physical volumes. Which command is run to add both physical volumes to a new volume group named DATA?
A. lvscan -v
B. vgcreate DATA /dev/sdb1 /dev/sdc1
C. pvcreate /dev/sdb1
D. lvcreate -L 700G -n research DATA
E. pvcreate /dev/sdc1
A
  1. B is correct. Use the vgcreate command to define a new volume group and assign physical partitions to it (/dev/sdb1 and /dev/sdc1 in this case). The vgcreate command is used after defining the physical volumes with pvcreate /dev/sdb1 /dev/sdc1.

A, C, D, and E are incorrect. Use the pvcreate command to define a partition (or even an entire disk) as an LVM physical volume. The lvscan command is used to view the logical volumes defined on the system. The lvcreate command is used to define logical volumes on the system. (Topic 4. Linux Troubleshooting and Diagnostics)

48
Q
48. Which are true about logical volumes? (Choose three)
A. Create and delete logical volumes
B. Adjust sound levels symmetrically
C. Snapshots
D. Adjust sound levels asymmetrically
E. Change sizes of logical volumes
A
  1. A, C, and E are correct. Logical volumes can be used for snapshots, creation and deletion of logical volumes, and increasing and decreasing the sizes of logical volumes.

B, and D are incorrect. Logical volume management has nothing to do with Linux audio capabilities. (Topic 4. Linux Troubleshooting and Diagnostics)

49
Q
49. A new Linux system was installed about a week ago. Three days ago, an administrative user compiled and installed a new application from source code. Now, the Ethernet interface in the system sporadically goes offline. Which command does the Administrator run to see the boot messages generated by the system when it was in a pristine state shortly after being installed?
A.  journalctl -b 2
B.  logger -p 2
C.  journalctl -b
D.  journalctl -b -2
A
  1. A is correct. The journalctl -b 2 command displays messages created during the second boot event found at the beginning of the journal. This should contain boot messages from the system’s pristine state required by the scenario.

B, C, and D are incorrect. The journalctl -b -2 command displays system messages that were logged two boot events ago. The logger command is used to send test log events to the logging daemon. The journalctl -b command displays boot messages that were logged in the most recent boot event. (Topic 3. Security)

50
Q
50. The content shown below is listed in which file?
# Virtual consoles
tty1
tty2
tty3
a. /etc/securetty
b. /dev/tty
c. /etc/yum.conf
d. /etc/ld.so.conf
A
  1. A is correct. The content shown is from the /etc/securetty file. This file lists the termiinals from which root CAN log in.

B is incorrect because the /dev/tty file is a character device driver. C is incorrect because /etc/yum.conf is the configuration file YUM repositories. D is incorrect because /etc/ld.so.conf is the configuration file for the location of dynamically linked libraries. (Topic 3. Security)

51
Q
  1. After installing GIT which two configuration properties must be defined before issuing a commit?
    a. username and email address
    b. MAC address and project name
    c. IP address and MAC address
    d. username and password
A
  1. A is correct. For GIT to work properly, every commit must relate to some username and email address so that all of the co-contributors can keep track of the changes.

B, C, and D are incorrect and are not required for co-contributor communications. (Topic 5. Automation and Scripting)

52
Q
  1. Which of the following is NOT a Linux Desktop Environment?
    a. GNOME
    b. VNC
    c. UNITY
    d. CINNAMON
A
  1. B is correct. VNC (Virtual Network Computing) is not a Linux Desktop Environment, but a utility for remote desktop computer access.

A, C, and D are incorrect because they are all Linux Desktop Environments providing login screens, and varied desktop appearances. GNOME is the default environment for several distributions including openSUSE and Fedora. UNITY is a popular desktop environment for Ubuntu Linux. CINNAMON is the popular on Linux MINT. (Topic 2. Systems Operation and Maintenance)
EXAM TIP Knowledge of default desktop environments is NOT a requirement for the Linux+ exam

53
Q
  1. Which of the following modifies the linux parameter to override the default boot target so that an Administrator can change a forgotten root password?
    a. init=1
    b. systemd.unit=rescue.target
    c. systemd.unit=emergency.target
    d. init=S
A
  1. C is correct. While booting a system, the Systems Administrator hits the ESC key when the GRUB menu appears, presses E to edit, and then scrolls down to the linux line. At the end of the linux line enter systemd.unit=emergency.target, and then press the F10 key to enter emergency mode, and begin the process of removing and replacing the root password.

A and D are incorrect for SYSTEMD systems, but would enter single-user mode on SysV init systems when entered at the end of the kernel line. B is incorrect because it would enter single-user mode on a SYSTEMD system, requesting the root password; and so the administrator would not be able to change the root password. (Topic 4. Linux Troubleshooting and Diagnostics)

54
Q
  1. Which of the following allows the Network Administrator to add a default gateway of 10.5.3.1? (Choose 2.)
    a. route add gateway 10.5.3.1
    b. ip route add default via 10.5.3.1
    c. ip route add default 10.5.3.1
    d. route add default gw 10.5.3.1
    e. route add default 10.5.3.1
A
  1. B and D are correct using either the route or ip command to add a default gateway.

A, C, and E are incorrect, and would result in syntax errors because of missing arguments within the commands. (Topic 1. Hardware and System Configuration)

55
Q
  1. Given the routing table below:
    # netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    Why does the following command fail?
    route add default gw 10.5.3.1
    a. A default route is already defined
    b. Default routes must defined on static networks only
    c. Because there is no route to 10.5.3.1
    d. The genmask value must be 255.0.0.0
A
  1. C is correct. In order for the gateway to exist, there must be some connection to the router, but the only connection shown is to the 192.168.8.0 network.

A, B, and D are incorrect because in this case the issue is there is no connection to the 10.5.3.0 network. (Topic 4. Linux Troubleshooting and Diagnostics)

56
Q
  1. The Network Administrator modified a configuration file to utilize a tier 1 timeserver. Since making the change, time updates via NTP are no longer occuring. What most likely has occured?
    a. Port 123 is blocked on the firewall
    b. The Network Administrator forgot to reboot the system
    c. The Network Administrator improperly ran the timedatectl command
    d. The feature is not available on Red Hat strains of Linux, and must be converted to a Debian strain
A
  1. A is correct. When the Network Administrator converts to a tier 1 timeserver, that implies the system changes time updates from the intranet (LAN), to now from the internet (WAN). NTP uses port 123 which now must be opened on the firewall.

B, C, and D are incorrect because the update can be made without a reboot. Since the administrator modified a configuration file, there is no need to use the timedatectl command, and of course NTP is available on all enterprise versions of Red Hat Linux. (Topic 4. Linux Troubleshooting and Diagnostics)

57
Q
  1. Which of the following commands can change the Time Zone on a Linux system?
    a. timedatectl
    b. date
    c. time
    d. hwclock
A
  1. A is correct. To change the Time Zone of the Linux server, run timedatectl set-timezone ìEurope/Lisbonî, for example. To list the available Time Zones run timedatectl list-timezones.

B, C, and D are incorrect. The date command will display the current date and time. The time command will display how long it takes for a command to run. The hwclock command is used to set the computer hardware clock. (Topic 1. Hardware and System Configuration)

58
Q
  1. Which utility will convert text to audio on a Linux system allowing blind users to hear what is typed?
    a. qt
    b. daisy
    c. speakeasy
    d. orca
A
  1. D is correct. The orca screenreader is a very popular text-to-speech tool for Linux.

A, B, and C are incorrect where qt is a programming language, daisy is an accessibility braille tool for the blind community, and speakeasy is a voice to text utility for varied systems, including Linux. (Topic 3. Security)

59
Q
  1. Which of the following describes the columns of the /etc/fstab file best?
    a. device, mount point, filesystem type, options, fsck order, dump option
    b. device, mount point, filesystem type, options, dump option, fsck order
    c. device, mount point, options, filesystem type, dump option, fsck order
    d. mount point, device, filesystem type, options, dump option, fsck order
A
  1. B is correct. The correct /etc/fsck column order is: device, mount point, filesystem type, options, dump option, fsck order.

A, C, and D are incorrect. (Topic 1. Hardware and System Configuration)

60
Q
  1. Which are NOT journaled filesystems? (Choose two)
    a. EXT2
    b. EXT3
    c. ISOFS
    d. XFS
    e. NTFS
A
  1. A and C are correct. EXT2 and ISOFS are not journaled file systems.

B, D, and E are incorrect and EXT3, XFS, and NTFS are journaled file systems which save changes in a buffer, so that data loss is minimized in case of a system interruption. (Topic 1. Hardware and System Configuration)

61
Q
  1. Which is NOT a method that results in an ext3 type file system?
    a. mke2fs -j /dev/sda2
    b. mkfs.ext3 /dev/sdb3
    c. tune2fs -t ext3 /dev/sdd4
    d. mkfs -t ext3 /dev/sdc7
    e. tune2fs -j /dev/sde8
A
  1. C is correct. The tune2fs -t ext3 /dev/sdd4 command fails because there is no -t option for tune2fs.

A, B, D, and E are incorrect because mke2fs -j /dev/sda2, mkfs.ext3 /dev/sdb3, and mkfs -t ext3 /dev/sdc7 will create an ext3 type file system on the partition. The tune2fs -j /dev/sde8 command will convert an ext2 type file system to ext3 by adding the journal. (Topic 1. Hardware and System Configuration)

62
Q
  1. Which is the command that shows whom is logged in and which commands they are running?
    a. whoami
    b. whom
    c. who
    d. w
    e. id
A
  1. D is correct. The w command displays who is logged into the system, and which processes they are running.

A, B, C, and E are incorrect. The whoami and id commands show who the user is currently logged in as, but not the processes they are running. The who command will display all logged in users, but not the processes they are running. The whom command is a distractor, and currently does not exist for Linux systems. (Topic 2. Systems Operation and Maintenance)

63
Q
  1. Which command searches /var/log/wtmp?
    a. last
    b. lastb
    c. who
    d. whoami
    e. w
A
  1. A is correct. The last command searches /var/log/wtmp to display that a list of the last logged in users.

B, C, D and E are incorrect. The lastb searches the /var/log/btmp file and displays a list of bad login attempts. The who command searches /var/log/utmp when available, and displays a list of currently logged on users. The whoami command displays the userís current user name, and the w command also searches /var/log/utmp to display whom is logged in, and which processes they are running. (Topic 2. Systems Operation and Maintenance)

64
Q
  1. Which command deletes the user account, and removes the user’s files from their home directory plus their email?
    a. usermod -r
    b. useradd -d
    c. userdel -d
    d. userdel -r
    e. usermod -d
A
  1. D is correct. Running userdel -r will delete the user, and the files from their /home directory and their mail spool. Files in other file systems need to be deleted manually.

A, B, C, and E are incorrect. The useradd and usermod commands are not capable of removing users. The -d option is not available to userdel. (Topic 2. Systems Operation and Maintenance)

65
Q
  1. Which commands conduct password expiration for users? (Choose three)
    a. usermod
    b. chage
    c. passed
    d. password
    e. shadow
A
  1. A, B, C are correct. Running usermod -e allows an Administrator to add an expiration date. Running passwd -e will immediately expire a user’s account. The chage command stands for “Change Age”, and offers many password expiration features.

D and E are incorrect. The shadow file is a database of password expiration details, and not a command. The password command is a distractor, and is not available in standard Linux. (Topic 2. Systems Operation and Maintenance)

66
Q
  1. Which of the below is the local system timezone configuration file?
    a. /etc/local/time
    b. /lib/localtime
    c. /usr/lib/localtime
    d. /etc/localtime
    e. /usr/bin/localtime
A
  1. D is correct. The timezone configuration file is called /etc/localtime.

A, B, C, and E are incorrect and are all distractors. None of the files exist in standard Linux. (Topic 1. Hardware and System Configuration)

67
Q
  1. Which option to the localectl command displays the current locale?
    a. list-locales
    b. status
    c. -l
    d. -s
A
  1. B is correct. Running localectl status will display the current locale setting, keymap, keymap layout, and X11 model.

A, C, and D are incorrect. The -s and -l options are distractors, and are currently not available within localectl. Running localectl list-locales will list available locales that can be set using set-locale. (Topic 1. Hardware and System Configuration)

68
Q
  1. Which environment variable will override all LC_* variables?
    a. LC_ALL
    b. LC_NAME
    c. LC_CTYPE
    d. LANG
A
  1. A is correct. Use LC_ALL to override the locality variables.

B, C, and D are incorrect. The LC_NAME environment variable formats how first and last names appear in different countries. The LC_CTYPE environment variable formats the classification and conversion of characters. The LANG variable specifies locale when and LC_var is not defined. (Topic 1. Hardware and System Configuration)

69
Q
  1. Running ls -l displays the following output:
    -rwsr-xr-x 1 todd manf 55322 Mar 18 10:20 runme
    When user montrie executes the runme command, what EUID will it run at?
    a. montrie
    b. todd
    c. root
    d. manf
A
  1. B is correct. The runme program will run at the effective user-id (EUID) of todd because the SUID bit is set as shown with the -s in the permissions -rwsr-xr-x; therefore, the command is run at the EUID of the owner of the file, NOT the user which is normally done.

A, C, and D are incorrect. If the SUID bit were not set, runme would run with the montrie user’s permissions. When logged in as a standard user, jobs do not normally run with an EUID of root or the group they belong to (in this case manf). (Topic 3. Security)

70
Q
  1. So that new directories have a default permission of 750, and regular files have a default permission of 640, the umask must be? (Choose two)
    a. 026
    b. 0026
    c. 027
    d. 0027
    e. 0036
    f. 036
A
  1. C and D are correct. The default file permissions are 666 and the default directory permissions are 777. The purpose of umask is to make files more secure by removing permissions when files are created. 0027 or 027 removes write permission for the group, and read, write, and execute for other.

A, B, E, and F are incorrect. 026 and 0026 would fail because the directory permission results to 751 instead of 750. 0036 and 036 fail because the although the file permission would result to 640, directory permissions would result to 741. (Topic 3. Security)

71
Q
  1. User Jeongeun gets an error message that she cannot create a new file because there is no more disk space; however, she is well below her quota use. What is the next command she runs to view total disk space utilization?
    a. quota
    b. df -i
    c. du -sh
    d. df -h
A
  1. D is correct. When Jeongeun runs df -h, she will see that the hard drive is 100% full, and that is why she cannot create a new file.

A, B, and C are incorrect. The question implies that she has already run the quota command because of not getting any quota errors. The df -i command will show inode utilization, not disk space use. Running du -sh will only show disk space use in her home directory and below, not the entire system. (Topic 4. Linux Troubleshooting and Diagnostics)

72
Q
  1. User Iohn notices that system performance is slowing, and suspects that memory shortages are the issue. He cannot add additional memory, so as a quick fix decides to add a swapfile to use as additional swap space. After creating the swapfile and setting up the Linux swap area, he notices no change in performance. What command did he most likely forget to run?
    a. swapon
    b. swapoff
    c. mkswap
    d. mount
A
  1. A is correct. User Iohn forgot to run swapon /d/swapfile to enable the swap area.

B, C, and D are incorrect. The swapoff command would disable the swap area. The mount command is used to access a file system, not swap space. Iohn already ran mkswap since the swap area was already set up as stated in the question. (Topic 4. Linux Troubleshooting and Diagnostics)

73
Q
  1. User QuiÒonez discovers that she can get better disk drive performance by converting from cfq or noop, to deadline. What command should she run for proper conversion to deadline?
    a. cat deadline < /sys/block/sda/queue/scheduler
    b. cat deadline > /sys/block/sda/queue/scheduler
    c. echo deadline > /sys/block/sda/queue/scheduler
    d. echo deadline < /sys/block/sda/queue/scheduler
A
  1. C is correct. User QuiÒonez would run echo deadline > /sys/block/sda/queue/scheduler to update the I/O scheduler from cfq or noop to deadline.

A, B, and D are incorrect because either the cat command would attempt to list a file called ìdeadlineî in A and B, or the < means to read from standard input, instead of write to standard output as shown in A and D. (Topic 4. Linux Troubleshooting and Diagnostics)

74
Q
  1. User Elimu is working on a bash script. The script contains this case statement:
    case $fruit ________
    orange|tangerine) echo taste like orange ;;
    *berry) echo taste like berry ;;
    *) echo Error: fruit not found ;;
    esac

Which command should Elimu place into the blank?

a. at
b. in
c. of
d. if

A
  1. B is correct. User Elimu completes the command as follows:
    case $fruit in
    for proper completion of the case statement.

A, C, and D are incorrect and all would be syntax errors. The at command is used to schedule jobs. The if command is a decision construct used within scripts. The of command is a distractor and not a part of standard Linux. (Topic 5. Automation and Scripting)

75
Q
75. User Wade is working on a bash script.  The script contains this for statement:
for fruit in orange apple berry grape
do
    echo this fruit tastes like $fruit
\_\_\_\_\_\_\_
Which command should Wade place into the blank?
a. end
b. rof
c. od
d. done
A
  1. D is correct. User Wade would complete the statement with the done command.

A, B, and C are incorrect. The end and rof commands are distractors and not a part of standard Linux. The od command provides an ìoctal dumpî representation of a file. (Topic 5. Automation and Scripting)

76
Q
  1. User Nadia is learning how to examine disk-drive performance, and learns to use iostat. To monitor performance, she would like to see five outputs, with 10 seconds of difference between them. Which of the below is the best way for her to accomplish this?
    a. iostat 5 10
    b. iostat 10 5
    c. iostat –count 5 –period 10
    d. iostat 10
A
  1. B is correct. User Nadia runs iostat 10 5 to view CPU and disk drive performance for 5 counts at 10 second periods.

A, C, and D are incorrect. Running iostat 5 10 outputs 10 counts at 5 second intervals, and iostat 10 outputs performance data every 10 seconds until interrupted with ^C (CTRL-C). Finally, iostat –count 5 –period 10 is currently not a feature of iostat and results in a syntax error. (Topic 1. Hardware and System Configuration)

77
Q
  1. User Walter needs to examine the performance of his RAID array. He is learning how to use mdadm, but is unsure as to which option to mdadm will show negative issues with the system, e.g. disk failures. Which of the below is the best way for Walter to accomplish this? (Choose three)
    a. mdadm –build
    b. mdadm –follow
    c. mdadm -F
    d. mdadm –monitor
A
  1. B, C and D are correct. Walter can run either mdadm -F, mdadm –follow, or mdadm –monitor to ìfollowî or ìmonitorî the RAID array as a foreground or background job that notifies System Administrators of any RAID issues.

A is incorrect as mdadm –build creates a legacy RAID array that does not use superblocks. Superblocks are a type of file system database that tracks file system state and changes. (Topic 1. Hardware and System Configuration)

78
Q
  1. Users Landon and Lonnie monitor the virtual machines. One of the applications they use requires telnet which unfortunately, uses the same escape string ^]. Which option to virsh allows them to change the escape string to ^[?
    a. –debug
    b. –chstr
    c. –esc
    d. –escape
A
  1. D is correct. Lonnie and Landon run virsh –escape ^[ to override the default escape sequence that telnet normally uses, ^].

A, B, and C are incorrect as –esc and –chstr do not exist, and are distractors. The –debug option performs up to 5 levels of logging and accounting for the virsh command. (Topic 1. Hardware and System Configuration)

79
Q
  1. System Administrators Laeia and Liara work side by side examining accounting results of disk drive performance. Laeia believes that poor performance is related to aging hard drives, and consults with Liara as to the next steps. Liara knows that exact command to run to check for bad blocks. She recommends which of the below?
    a. blockcheck
    b. badblocks
    c. kill
    d. bbcheck
A
  1. B is correct. Laeia and Liara end up running the badblocks command to check for bad blocks on the hard drive.

A, C, and D are incorrect because blockcheck and bbcheck are not presently Linux commands, and are distractors. The kill command is used to control running processes. (Topic 4. Linux Troubleshooting and Diagnostics)

80
Q
  1. Sorana desires to display memory and swap utilization using the free command. Unlike iostat, sar, and others, free does NOT update periodically by default. Which command can she run with free to automatically display updates every two seconds, refreshing the screen everytime?
    a. period
    b. watch
    c. free
    d. twosec
A
  1. B is correct. Sorana runs the watch command For GIT to work properly, every commit must relate to some username and email address so that all of the co-contributors can keep track of the changes.

A, C, and D are incorrect as period and twosec are commands that do not exist or are not available with standard Linux. Running free –count 5 –seconds 2 would give similar results, but it does NOT refresh the screen during each update. (Topic 4. Linux Troubleshooting and Diagnostics)

81
Q
  1. User Ugo decides that he wants new files and directories below the directory work to automatically have the same group permission as work. Which command can Ugo run to do this?
    a. chmod g+s work
    b. chmod +a work
    c. chmod g=w work
    d. chmod g=rw work
A
  1. A is correct. User Ugo runs chmod g+s work so that files and directories created below the work directory will belong to the same group as the work directory.

B, C, and D are incorrect as chmod +a work will result in a syntax error, and chmod g=w work as well as chmod g=rw work provide write, and read/write privileges to the group, respectively, but new files and directories below the directory will belong to the EGID (effective group-ID) of the creating user. (Topic 3. Security)

82
Q
  1. Zhang is a Network Administrator that needs to open the firewall to allow web access. Which of the following would do this for her?
    a. firewall-cmd –zone=public –allow=http
    b. firewall-cmd –zone=public –add-service=http
    c. firewall-cmd –zone=public –add-service=web
    d. firewall-cmd –zone=public –add=http
A
  1. B is correct. Ms. Zhang runs
    firewall-cmd –zone=public –add-service=http
    so that users can access her website.

A, C, and D are incorrect and would give syntax errors because –allow, =web, and –add are improper arguments for firewall-cmd. (Topic 3. Security)

83
Q
  1. Henri is a Network Administrator that is required open new ports for NTP, and HTTPd. He needs to see the display the current firewall settings using iptables. Which of the following would do this for him?
    a. iptables -d
    b. iptables -s
    c. iptables -L
    d. iptables -F
A
  1. C is correct. Henri runs iptables -L to display the current firewall settings.

A, B, and D are incorrect where iptables -s and iptables -d setup the source and destination port, respectively. Use iptables -F to flush (delete) the DNS tables. (Topic 3. Security)

84
Q
  1. Petra is a Systems Administrator working on a Linux system running SysV init. She runs the following as root:
    # chkconfig –list | grep auditd
    auditd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    Which of the following would she run to enable auditd to start at runs state 3 or 5 upon reboot?
    a. chkconfig –level 35 auditd start
    b. chkconfig –level 35 auditd on
    c. chkconfig –level 35 start auditd
    d. chkconfig –level 35 on auditd
A
  1. B is correct. Petra runs chkconfig -level 35 auditd on to enable logging and accounting services for her Linux system.

A, C, and D are incorrect and would cause syntax errors because start is an improper argument, and service cannot be the last argument. (Topic 2. Systems Operation and Maintenance)

85
Q
  1. Milos is a Storage Administrator and notices disk space is running out on one of the logical volumes. Before using lvextend to enlarge the volume, what must he do first?
    a. Know which volume group device to extend
    b. Reboot the system
    c. Restart the logical volume service
    d. Restart meta-device management
A
  1. A is correct. Milos needs to know which volume group device to extend, so that he can then run lvextend -L+20G /dev/myvg/myvol to add another 20 gigabytes to the /dev/myvg/myvol volume.

B, C, and D are incorrect because it is not necessary to restart services, or reboot the system for extending or growing to take affect. (Topic 4. Linux Troubleshooting and Diagnostics)

86
Q
  1. Ushna is a Cloud Administrator that would like to orchestrate the setup of 500 Centos Linux Servers. Of the tools listed below, which is the one she would NOT choose as part of the configuration?
    a. Cloud-init
    b. Orchestrate
    c. Anaconda
    d. Kickstart
A
  1. B is correct. Ushna would not use a tool called Orchestrate because there is no such tool available to her on Centos Linux.

A, C, and D are incorrect and are tools that Ushna could use to setup and orchestrate the installation of 500 servers. Anaconda sets up cloud images. Cloud-init makes it easy to configure cloud images. And Kickstart can perform automated operating system installation. (Topic 1. Hardware and System Configuration)

87
Q
  1. Thanasi, a Cloud Engineer is updating files for orchestration. Below is some sample content that he is editing with /bin/vi:
yum_repos:
\_\_\_epel-testing:
\_\_\_\_\_\_\_baseurl: http://ftp.wheezy.com/pub/epel/$basesearch
\_\_\_\_\_\_\_enable: false
\_\_\_\_\_\_\_failovermethod: priority

This is most likely what type of file?

a. SAML
b. XML
c. JSON
d. YAML

A
  1. D is correct. Thanasi is currently editing a YAML file.

A, B, and C are incorrect and the file does not represent either SAML, XML, or JSON file. (Topic 5. Automation and Scripting)

88
Q
  1. Teliana, a Cloud Engineer is updating files for orchestration. Below is some sample content that she is editing with /bin/vi:
{
\_\_\_\_Name: Maria,
\_\_\_\_Name: Bueno,
\_\_\_\_age: 25, 
}

This is most likely what type of file?

a. SAML
b. XML
c. JSON
d. YAML

A
  1. C is correct. Teliana is currently editing a JSON file.

A, B, and D are incorrect and the file does not represent either SAML, XML, or YAML file. (Topic 5. Automation and Scripting)

89
Q
  1. Systems Administrator, Juan, has just enabled SELinux and finding it is very difficult to work. He is just testing the system, and does not require it to be fully functional. What should he run that will simply warn of any SELinux offenses?
    a. setenforce permissive
    b. setenforce enforcing
    c. setenforce disabled
    d. setenforce warning
A
  1. A is correct. Juan runs the setenforce permissive command as root to use SELinux in warning mode only.

B, C, and D are incorrect because setenforce enforcing is the current state Juan is in, and has made the system mostly unfunctional Running setenforce disabled allows Juan to work, but will not load any SELinux policies, so he will not be able to test it. Running setenforce warning would result in an error as the warning option does not exist, and is a distractor. (Topic 2. Systems Operation and Maintenance)

90
Q
  1. Systems Administrator, Katerina, is running a foreground job name windsim, and she would like to stop it temporarily, and have it continue later. What key sequence does she run to stop the job?
    a. CTRL-C
    b. CTRL-Z
    c. CTRL-\
    d. CTRL-S
A
  1. B is correct. Katerina runs ^Z to stop the running windsim job. If she runs fg, the job will wake and continue in the foreground. If instead she runs bg, the job will wake and continue in the background.

A, C, and D are incorrect as ^C will cancel the job, ^\ will cancel the job and ìdump coreî (a memory image of the job save to the disk and named ìcoreî), and ^S is ignored. If Katerina runs cat really-long-file, ^S and ^Q will stop and start the data stream as it displays on the screen. (Topic 2. Systems Operation and Maintenance)

91
Q

Which file provides shell configuration for the initial login environment?

a. /etc/profile
b. /etc/bashrc
c. .bash_profile
d. /etc/profile.d/

A

C is correct. The .bash_profile file provides shell configuration for the initial login environment. This differs from the .bashrc file, which provides settings for all of the user’s interactive shells.

The /etc/profile file provides system-wide environment variables. This may be more effective for administrators to configure if there are settings that apply to all users.

The /etc/bashrc file provides system-wide Bash settings. This is a little different than /etc/profile, which is used for variables.

The /etc/profile.d/ directory serves as a storage location for scripts administrators may use to set additional system-wide variables. It is recommended you set the environment variables via scripts contained in /etc/profile.d/ rather than editing the /etc/profile file directly.

92
Q

Which man command option searches for the specified string on all pages?

a. -K
b. -k
c. -f
d. -t

A

A Is correct. The –K option used with the man command searches for the specified string on all pages.

The –k option used with the man command lists all manual pages/sections containing the keyword along with their location. This option will not search for the specified string on all pages.

The –f option used with the man command displays a short description of the command along with the manual pages/sections.

The –t option used with the man command will format the man pages to enable printing. This option will not search for the specified string on all pages.

93
Q

Which command enables you to search a specific location for files and directories that adhere to some search criteria?

a. find
b. locate
c. which
d. whereis

A

A is correct. The find command enables you to search a specific location for files and directories that adhere to some search criteria. It recursively searches the directory structure, including any subdirectories and their contents, beginning with the search location you enter. You can perform one or more actions on the files found.

The locate command performs a quick search for any specified string in file names and paths stored in the mlocate database. This database must be updated regularly for the search to be effective. The results displayed may be restricted to files that users have permissions to access or execute.

The which command displays the complete path of a specified command by searching the directories assigned to the PATH variable.

The whereis command is used to display various details associated with a command.

94
Q

Device files are located in several different directories and subdirectories. Which location contains various files that represent system information reported by the kernel?

a. /sys/
b, /proc/
c. /dev/
d. /etc/

A

B is correct. The /proc/ location contains various files that represent system information reported by the kernel. In particular, the /proc/devices file contains a list of all device drivers that the kernel is currently running, separated by character and block storage devices.

The /sys/ location is a virtual file system similar to /proc/ but that focuses more on creating a hierarchical view of device information. In particular, the /sys/devices/ subdirectory includes files that expose details about specific devices.

The /dev/ location contains device driver files that enable the system and users to access devices themselves.

The /etc/ location includes configuration files for many components, including components that interface with devices.

95
Q

Virtual machine templates can make deployments much more efficient. Which template is used to store information that is easy for most programming languages to interpret and use?

a. Open Virtualization Format (OVF)
b. JavaScript Object Notation (JSON)
c. YAML Ain’t Markup Language (YAML)
d. Container images

A

B is correct. JSON is used to store information that is easy for most programming languages to interpret and use. Because JSON uses a standard JavaScript format, it is also relatively easy for humans to interpret and write.

OVF contains the necessary configuration files, packages, etc., for virtual machines and network devices. These files may be used in the deployment of virtual machines in a virtualized environment.

YAML may be used to store configuration information that is used on newly deployed virtual machines. This information may be used by cloud-init to install software or create user accounts during the virtual machine’s first boot, or may be used by orchestration tools like Ansible.

Containerization virtualizes at the operating system layer, providing application isolation, even though the applications are sharing a single OS. Containers may be useful for hosting production applications as well as for testing applications by developers.

96
Q

Being security conscious, you always check out any software package being installed to your CentOS systems. Which command can you run to check supporting software packages prior to installing a new software application?

a. yum deplist
b. rpm -V
c. apt-cache depends
d. ldd

A

A is the correct answer. Use the rpm -qR {package name} and yum deplist {package name} commands to discover dependencies before attempting an installation on Red Hat-derivative distributions.

Use the rpm -V {package name} command to verify that all components of a package are installed. This is particularly useful if you believe configuration files or other needed files have been deleted.

Use the apt-cache depends {package name} command to discover dependencies before attempting installation on Debian-derivative distributions.

Use ldd [options] {program binary} to check for shared library file dependencies for software you will be compiling.

97
Q

Which file that contains the user’s private key is used to configure SSH (Secure Shell) key-based authentication in Linux?

a. authorized_keys
b. known_hosts
c. config
d. id_rsa

A

D is correct. The file that is used to configure SSH key-based authentication in Linux called id_rsa, contains the user’s private key.

The file that is used to configure SSH key-based authentication in Linux called authorized_keys, is a file on the remote server that lists the public keys that the server accepts. In other words, the server uses this file to authenticate the client.

The file that is used to configure SSH key-based authentication in Linux called known_hosts, is a file on the client that lists the public keys that the client accepts. In other words, the client uses this file to authenticate servers.

The file that is used to configure SSH key-based authentication in Linux called config, is a file on the client that you can use to configure SSH connection settings, such as using an IdentityFile directive to associate multiple keys with specific servers.

98
Q

Use a case statement to evaluate a variable. Which example will evaluate at least two conditions of the variable and execute a command?

a. case $var in condition1 ) execute condition2) execute case
b. case $var in condition1 ) execute ;; condition2 ) execute ;;
c. case $var in condition1 ) execute ;; condition2 ) execute ;; condition3 ) execute ;; esac
d. case $var in condition1 execute condition2 execute esac

A

C is the right answer. This case statement example is missing ;; at the end of each execute code which indicates the end of an action. The last line of code must be written with the esac statement to indicate the end of a set of instructions.

This case statement is missing an esac statement at the end to indicate the end of a set of instructions.

This case statement is written to evaluate at least two conditions of the $var variable and will execute a command if any one of the conditions is true.

This case statement is missing a ) at the end of each condition to be evaluated. It is also missing ;; at the end of each execute code.

99
Q

What type of automation approach should your organization use to reduce the amount of work needed to automate the deployment and configuration of 1000s of Linux servers in a cloud infrastructure?

a. Agent-based Orchestration
b. Ansible
c. Agentless Orchestration
d. Chef

A

C is the correct answer Agentless Orchestration does not require extra components at endpoints. It does this by connecting to systems or devices over existing transport mechanisms. SSH is an example of a transport mechanism that can be used to connect to Linux machines. An agentless approach reduces the amount of setup required for agent-based models.

Agent-based orchestration requires a software component to reside on the managed device. This may impose additional demands on the organization’s environment and require extra setup. For example, an agent-based model may require firewall configuration in constrained environments.

Ansible is the name of an orchestration tool that uses an agentless architecture to deploy and configure endpoints automatically. It can communicate over Secure Shell (SSH) and Windows Remote Management (WinRM).

Chef is the name of an orchestration tool that operates in a client-server architecture. This requires an agent called a Chef client, to run on each managed node. The Chef client downloads and evaluates configuration code, known as recipes from a Chef server.

100
Q

Chef and Puppet are both examples of what type of orchestration tool?

a. Agent-based
b. Agentless
c. Infrastructure as code
d. Cookbook

A

A. is the correct answer. Agent-based orchestration requires a software component to reside on the managed device. A server application stores the set of commands which are sent to agents on multiple devices to be run locally on that device. Additional configurations such as firewall rules may be required. Deploying another orchestration server can provide high availability.

Agentless Orchestration does not require extra components at endpoints. It does this by connecting to systems or devices over existing transport mechanisms. SSH is an example of a transport mechanism that can be used to connect to Linux machines. An agentless approach reduces the amount of setup required for agent-based models.

Infrastructure as code is a name for orchestration tools that manage the entire deployment and configuration process through scripting and code files, rather than through traditional software tools. Infrastructure as code relies on a single configuration specification to deploy the supporting infrastructure (the operating system) and the necessary applications.

The term “cookbook” is used by an orchestration tool called Chef. Chef operates in a client-server architecture to deploy configuration code known as recipes. These recipes are also known as cookbooks.

101
Q

After downloading the Linux distribution of your choice, what is the next step in the Linux installation?

a. Configure localization options
b. Configure user accounts
c. Configure BIOS/UEFI boot options
d. Prepare the boot media

A

D. is the correct answer. Localization options include time, time zone, hardware clock, locale information, and keyboard mapping. These options are available during the Linux installation wizard. These options can also be configured through automated methods such as orchestration.

Configuring the user accounts of the system commonly happen after already setting up localization options, storage partitioning scheme, and network identity.

The configuration of the BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface) boot options prepare the system to retrieve the installation files by various installation methods. These methods include the use of the local hard drive, external removable media, or over the network. Configuring the boot options normally occur after preparing the boot media.