Wiley Quiz Questions Flashcards

1
Q

Which web server is used in the popular LAMP stack?

A

Apache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A ________ runs in background and listens for client connection requests for a single application.

A

Daemon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which open-source database provided fast performance and became a popular choice for web applications?

A

MySQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does a server know what client request is sent to which application daemon?

A

Ports

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What popular open source web server can also perform as a load balancer?

A

nginx

The nginX web server can also perform as a load balancer and send client requests to multiple backend web servers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What format does MongoDB use to store data elements in the database?

A

JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which part of the Linux mail process is responsible for sending emails to remote hosts?

A

MTA

The MTA package is responsible for connecting with remote mail hosts to deliver email messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which part of the Linux mail process allows you to create filters to automatically redirect incoming mail messages?

A

MDA

The MDA allows you to create filters to match email messages to redirect to other folders

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What protocol should you use to mount folders from remote Linux servers on your local Linux server?

A

NFS

The NFS protocol is used to share folder areas on the network with clients

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The ________ software package allows your Windows workstations to mount a folder stored on a Linux server.

A

Samba

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which two software packages are used in Linux to maintain log files?

A

rsyslogd

journald

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which software program should you load on your Linux server to synchronize its time with a standard time server?

A

ntpd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What software package allows a Linux server to print to a network printer?

A

CUPS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If you see the named program running in background on your Linux server, what service does it provide?

A

Hostname resolution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which authentication package used to be called by the name “Yellow Pages”?

A

NIS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What package do you need to install to allow your Linux server to provide IP addresses to clients on your local network?

A

DHCPd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The _______ package allows you to create a secure tunnel across a private network to access your local network remotely.

A

OpenSSH

The OpenSSH package allows you to use certificates to establish a secure connection between two devices on the network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What server role should you implement to block your local network clients from accessing sports websites during business hours?

A

A web proxy

A web proxy server allows you to intercept client web requests and block any requests based on rules you define

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What server role should you implement to increase performance on your company’s website?

A

A load balancer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

A _______ allows your developers to easily deploy applications between development, test, and production.

A

A container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

You are looking at a directory that you have not viewed in a long time and need to determine which files are actually directories. Which command is the best one to use?

A

ls -F

append an indicator code of / to every directory name, so therefore it is the best choice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

You are using the ls command to look at a directory file’s metadata but keep seeing metadata for the files within it instead. What command option will rectify this situation?

A

-d

The -d switch on the ls command will allow you to view a directory file’s metadata instead of seeing metadata for the files managed by that directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

You have just created an empty directory called MyDir. Which command most likely did you use?

A

mkdir -v MyDir

The mkdir -v command creates a directory and lets you know whether or not it was successful

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

You have a file that is over 10GB in size, and it needs to be backed up to a locally attached drive. What is the best utility to use in this situation?

A

The rsync utility allows you to perform fast local copies, so for a big file it is the best utility to use in this case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

A long-time server administrator has left the company, and now you are in charge of her system. Her old user account directory tree, /home/Zoe/, has been backed up. Which command is the best one to use to quickly remove her files?

A

rm -rI /home/Zoe

The rm -rI command will recursively delete the files in the /home/Zoe directory tree, and it will ask before it starts, so you know you are deleting the correct tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

There is a large directory structure that needs to be renamed. What mv command options should you consider employing?

A

-I -n -v

When renaming a directory, you only need to employ the mv command. However, it is wise to use the -i option, so if the new directory name already exists, the utility will stop and ask permission prior to proceeding. Even better is to use the -n option; that way, if the new name you select is already being used, the mv command does not allow you to overwrite it. Also, the -v option is worthwhile, so the mv command operates in verbose mode, telling you want is going on

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

You are trying to decide whether to use a hard link or a symbolic link for a data file. The file is 5GB, has mission-critical data, and is accessed via the command line by three other people. What should you do?

A

Create three hard links and provide the links to the three other people for data protection

The hard links will prevent the three other command-line interface users from accidentally deleting the data. If they delete their link’s name, they will not delete the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

A short text-based control file is no longer working properly with the program that reads it. You suspect the file was accidentally corrupted by a control code update you performed recently, even though the file’s control codes are all correct. Which command should you use next on the file in your problem investigation?

A

cat -v

The cat -v command will show any nonprinting characters that may have gotten embedded in the control file causing it to be corrupt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

You have two short text files that have maximum record lengths of 15 characters. You want to review these files side by side. Which of the following commands would be the best to use?

A

pr -mtl 20

the best command to use is the pr -mtl 20 command. This will display the files side by side, remove any file headers or trailers, and set the page length to 20 lines so the files do not scroll off your screen. Of course, you may need to adjust the line length depending upon your screen’s resolution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

You have a lengthy file named, FileA.txt. What will the head -15 FileA.txt command do?

A

Display the first 15 lines of the file

The head command can use either the -n 15 switch or the -15 switch to display a file’s first 15 lines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

You have issued the command grep Hal on a text file you generated using information from a failed login attempts file. It returns nothing, but you just performed a test case, by purposely failing to log into the Hal account, prior to generating the text file. Which of the following is the best choice as your next step?

A

It is possible that the account name Hal is listed in the generated text file as hal. Therefore, your best next step is to employ the -i option on the grep command. This will quickly search the text file for the word Hal, while ignoring case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

You are trying to peruse a rather large text file. A coworker suggests you use a pager. Which of the following best describes what your coworker is recommending?

A

A pager utility allows you to view one text page at a time and move through the text at your own pace

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Which of the following does not describe the less utility?

A

You need to use the q key to exit from the less pager utility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Which diff option is the best option to allow you to quickly determine if two text files are different from one another?

A

The -q (or –brief) option used with the diff command will allow you to quickly determine if two text files are different from one another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

You are working on a Linux server at the command line, and you try to issue a diff command and receive a response stating that the command was not found. What is the next best step to take in order to start the troubleshooting process?

A

Enter the which diff command

the which command will allow you to quickly see the location of the program you provide as an argument. If you see no response, you can go on to the next troubleshooting step of determining if the program is not installed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

You are trying to find a file on your Linux server whose name is conf. Employing the locate conf command for your search shows many directories that contain the letters conf. What is the best description for why this is happening?

A

By default, the locate command uses file globbing, which adds wildcards to the pattern you enter. Thus, conf is turned into conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

You downloaded a large important file, fortytwo.db, from your company’s local website to your Linux server but got interrupted by an emergency. Now you cannot remember where you stored the file. What is the best first step to fixing this problem?

A

Issue the sudo updatedb command

The locate utility searches the mlocate.db database, which is typically only updated one time per day via a cron job. Therefore, for this newly created file, the first thing you should do is update the mlocate.db via the updatedb command, using super user privileges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

You want to search for a particular file, main.conf, using the find utility. This file most likely is located somewhere in the /etc/ directory tree. Which of the following commands is the best one to use in this situation?

A

find /etc -name main.conf

When using the locate command, the path argument is listed first, which is a starting point directory. The find utility will search through that directory and all its subdirectories (recursively) for the file or files you seek. Also, the -name switch allows you to search for a file by name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Yesterday a coworker, Michael, was fired for nefarious behavior. His account and home directory were immediately deleted. You need to audit the server to see if he left any files out in the virtual directory system. Which of the following commands is the best one to use in this situation?

A

find / -nouser

The find / -nouser command will search through the entire virtual directory structure looking for any files that do not have a username associated with them. Since Michael’s account and home directory were deleted, any files he owned out in the virtual directory structure will not have a username associated with them, only a user ID (UID)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

You need to figure out what configuration file(s) hold a host name directive. Which of the following commands is the best one to use?

A

grep

The grep utility will allow you to search file contents quickly and effectively

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

The cat -E MyFile.txt command is entered, and at the end of every line displayed is a $. What does this indicate?

A

A text file record is considered to be a single file line that ends in a newline linefeed that is the ASCII character LF. You can see if your text file uses this end-of-line character via the cat -E command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

The cut utility often needs delimiters to process text records. Which of the following best describes a delimiter?

A

To properly use some of the cut command options, fields must exist within each text file record. These fields are data that is separated by a delimiter, which is one or more characters that create a boundary between different data items within a record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Which of the following utilities change text within a file?

A

Recall that many utilities that process text do not change the text within a file unless redirection is employed to do so. The only utilities in this list that will allow you to modify text include the text editors vim and nano

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

You have a text file, monitor.txt, which contains information concerning the monitors used within the data center. Each record ends with the ASCII LF character and fields are delimitated by a comma (,). A text record has the monitor ID, manufacture, serial number, and location. To display each data center monitor’s monitor ID, serial number, and location, use which cut command?

A

The cut command gathers data from the text file, listed as its last argument, and displays it according to the options used. To define field delimiters as a comma and display each data center monitor’s monitor ID, serial number, and location, the options to use are -d “,” -f 1,3,4. Also, since the text file’s records end with an ASCII LF character, no special options, such as the -z option, are needed to process these records

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

The grep utility can employ regular expressions in its PATTERN. Which of the following best describes a regular expression?

A

a regular expression is a pattern template you define for a utility, such as grep, which uses the pattern to filter text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

You are a system administrator on a CentOS Linux server. You need to view records in the /var/log/messages file that start with the date May 30 and end with the IPv4 address 192.168.10.42. Which of the following is the best grep command to use?

A

grep “May 30.*192.168.10.42” /var/log/messages

It uses the quotation marks around the pattern to avoid unexpected results and uses the .* regular expression characters to indicate that anything can be between May 30 and the IPv4 address. No additional switches are necessary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Which of the following is a BRE pattern that could be used with the grep command?

A

Sp?ce
“Space, the .*frontier”
^Space
frontier$

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

You need to search through a large text file and find any record that contains either Luke or Laura at the record’s beginning. Also, the phrase Father is must be located somewhere in the record’s middle. Which of the following is an ERE pattern that could be used with the egrep command to find this record?

A

”(^Luke|^Laura) .Father is.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

A file data.txt needs to be sorted numerically and its output saved to a new file newdata.txt. Which of the following commands can accomplish this task?

A

To sort the data.txt file numerically and save its output the new file, newdata.txt, you can either use the -o switch to save the file or employ standard output redirection via the > symbol. In both cases, however, you need to use the -n switch to properly enact a numerical sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Which of the following commands can display the data.txt and datatoo.txt files’ content one after the other to STDOUT? (Choose all that apply.)

A

cat -n data.txt datatoo.txt

sort data.txt datatoo.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

A text file, StarGateAttacks.txt, needs to be specially formatted for review. Which of the following commands is the best command to accomplish this task quickly?

A

The pr command’s primary purpose in life is to specially format a text file for printing, and it can accomplish the required task fairly quickly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

You need to format the string 42.777 into the correct two-digit floating number. Which of the following printf command FORMAT settings is the correct one to use?

A

The printf FORMAT “%.2f\n” will produce the desired result of 42.78

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

A Unicode encoded text file, MyUCode.txt, needs to be perused. Before you decide what utility to use in order view the file’s contents, you employ the wc command on it. This utility displays 2020 6786 11328 to STDOUT. What of the following is true?

A

The file has 2,020 lines in it

The file has 6,786 words in it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Which of the following best defines a file descriptor?

A

A file descriptor is a number that represents a process’s open files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

By default, STDOUT goes to what item?

A

By default, STDOUT goes to your current terminal, which is represented by the /dev/tty file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Which of the following commands will display the file SpaceOpera.txt to output as well as save a copy of it to the file SciFi.txt?

A

cat SpaceOpera.txt | tee SciFi.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Which of the following commands will put any generated error messages into the black hole?

A

sort SpaceOpera.txt 2> /dev/null

The /dev/null file is also called the black hole, because anything you put into it cannot be retrieved. If you do not wish to see any error messages while issuing a command, you can redirect STDERR into it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

Which of the following commands will determine how many records in the file Problems.txt contain the word error?

A

grep error Problems.txt | wc -1

To find records within the Problems.txt file that contain the word error at least one time, the grep command is employed. The correct syntax is grep error Problems.txt. To count the records the grep command’s STDOUT is piped as STDIN into the wc utility. The correct syntax to count the records, is wc -l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

You want to find any file named 42.tmp, which exists somewhere in your current directory’s tree structure and display its contents to STDOUT. Which of the following will allow you to build a command to do this?

A

The xargs command, $() method, backticks (`), and brace expansion all allow you to build a command-line command on the fly. In this case, only options B, C, and E are using the correct command syntax to find any file named 42.tmp, which exists somewhere in your current directory’s tree structure and display its contents to STDOUT. Therefore, options B, C, and E are correct answers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

You want to edit the file SpaceOpera.txt and decide to use the vim editor to complete this task. Which of the following are vim modes you might employ?

A

The three modes of the vim editor are command (also called normal mode), insert (also called edit or entry mode), and ex (sometimes called colon commands) mode. Therefore, options A, C, D, and E are correct answers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

What program does the workstation firmware start at boot time?

A

The workstation firmware looks for the bootloader program to load an operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

Where does the firmware first look for a Linux bootloader program?

A

The workstation firmware looks at the first sector of the first hard drive to load the bootloader program. This is called the Master Boot Record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

The ______ command allows us to examine the most recent boot messages?

A

The kernel ring buffer, which you can view by typing dmesg, contains messages from the boot messages from the kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

What folder do most Linux distributions use to store boot logs?

A

Most Linux distributions store boot log files in the /var/log folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Where does the workstation BIOS attempt to find a bootloader program?

A

The BIOS firmware can look in multiple locations for a bootloader program. Most commonly it looks at the internal hard drive installed on the system, but if none is found, it can search other places. Most workstations allow you to boot from an external hard drive or from a DVD drive. Modern workstations now also provide the option to boot from a USB memory stick inserted into a USB port on the workstation. Finally, many workstations provide the PXE boot option, which allows the workstation to boot remotely from a network server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

Where is the Master Boot Record located?

A

The Master Boot Record (MBR) is located in only one place, on the first sector of the first hard drive on the workstation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

The EFI System Partition (ESP) is stored in the _______ directory on Linux systems

A

The ESP is stored in the /boot/efi directory on Linux systems. The UEFI firmware always looks for the /boot/efi directory for bootloader programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

What filename extension do UEFI bootloader files use?

A

The UEFI specification doesn’t require a specific extension for UEFI bootloader files. However, it has become common in Linux to use the .efi filename extension to identify them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

Which was the first bootloader program used in Linux?

A

The Linux Loader (LILO) bootloader program was the first bootloader used in Linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

Where are the GRUB Legacy configuration files stored?

A

The GRUB Legacy configuration files are stored in the /boot/grub directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

Where are GRUB2 configuration files stored?

A

The GRUB2 bootloader stores configuration files in both the /boot/grub directory and the /etc/grub.d directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

You must run the ______ command to generate the GRUB2 grub.cfg configuration file

A

The grub-mkconfig command combines the configurations defined in the /etc/default/grub file and all files in the /etc/grub.d folder into a single grub.cfg configuration file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

What command must you run to save changes to a GRUB Legacy boot menu?

A

The grub-install command installs any configuration changes into the GRUB MBR

74
Q

The ____ firmware method has replaced BIOS on most modern IBM-compatible computers

A

The UEFI firmware method has replaced the BIOS in most IBM-compatible computers

75
Q

What memory area does Linux use to store boot messages?

A

The kernel ring buffer is an area in memory reserved for storing output messages as the Linux system boots

76
Q

What command parameter would you add to the end of the GRUB2 linux command to force a Linux system to start in single-user mode?

A

The single command parameter instructs the Linux system to start in single user mode after booting

77
Q

What is the term commonly used for when the Linux system halts due to a system error?

A

A kernel panic occurs when a Linux system halts unexpectedly due to a system error

78
Q

The ________ command generates the GRUB2 configuration used for booting

A

The grub-mkconfig command processes GRUB2 directives stored in the /etc/grub.d folder to generate the GRUB2 configuration, which you can redirect to the /etc/grub2.cfg file

79
Q

What program allows you to fix corrupt hard drive partitions?

A

The fsck program can perform a filesystem check and repair multiple types of filesystems on partitions

80
Q

Which command allows you to append a partition to the virtual directory on a running Linux system?

A

The mount command allows you to specify the partition and the location in the virtual directory to append the partition files and folders. The files and folders contained in the partition then appear at that location in the virtual directory

81
Q

The init program may be located in which of the following directories?

A

The init program may exist in the /etc/, /sbin/, or /bin/ directory, depending upon your distribution and its version

82
Q

Which of the following is true concerning systemd service units?

A

Services can be started at system boot time.
Services can be started in parallel.
A service can be started based upon a timer.
A service can be started after all other services are started.
A service can be prevented from starting at system boot time.

83
Q

Which of the following is not a systemd target unit?

A

There is no runlevel7.target. The legitimate systemd targets, which provide backward SysV init compatibility, go from runlevel0.target through runlevel6.target

84
Q

You need to modify a systemd service unit configuration. Where should the modified file be located?

A

Any modified systemd service unit configuration file should be stored in the /etc/systemd/system/ directory. This will prevent any package upgrades from overwriting it and keep the directory precedence from using the unmodified service unit copy, which may reside in the /usr/lib/systemd/system/ directory

85
Q

On your server, you need Service-B to start immediately before Service-A. Within the systemd Service-A unit configuration file, what directive should you check and potentially modify?

A

For starting Service-B immediately before starting Service-A, the Service-A unit configuration file will need to employ the After directive, set it similar to something like: After=Service-B.unit

86
Q

For setting environment parameters within a unit configuration file, which directives should you potentially employ?

A

Linux systems use environment variables to store information about the shell session and working environment. If you need to ensure that a particular environment variable is set properly for your service, you need to employ the Environment directive and/or the EnvironmentFile directive for setting environment parameters

87
Q

You attempt to jump to a systemd target using the systemctl isolate command, but it will not work. You decide to look at the target unit file. What might you see there that is causing this problem?

A

If a target unit file has the AllowIsolate=no setting, the target cannot be used with the systemctl isolate command

88
Q

You have modified an OpenSSH service’s configuration file, /etc/ssh/ssh_config. The service is already running. What is the best command to use with systemctl to make this modified file take immediate effect?

A

The best command to make the modified file take immediate effect for the OpenSSH service is systemctl reload. This command will load the service configuration file of the running designated service without stopping the service

89
Q

Your system uses systemd and has a service currently set to not start at system boot. You want to change this behavior and have it start. What systemctl command should you employ for this service?

A

To set a particular service unit to start at boot time, you need to use the systemctl enable command followed by the service unit name

90
Q

You need to change the system’s default target. What systemctl command should you use to accomplish this task?

A

To change the system’s default target, you need to employ the systemctl set-default command, passing the target name as an argument and using super user privileges

91
Q

Your systemd system is taking a long time to boot and you need to reduce the boot time. Which systemd-analyze command is the best to start narrowing down which units need to be investigated first?

A

The blame command displays the amount of time each running unit took to initialize, and the units and their times are listed starting from the slowest to the fastest. That way, you can start investigating the units at the list’s top

92
Q

Your older Debian-based Linux distribution system uses SysV init. It soon is going to be upgraded to a Debian-based distro that uses systemd. To start some analysis, you enter the runlevel command. Which of the following are results you may see?

A

Debian-based Linux distributions that use SysV init only use runlevels from 0 through 2. The runlevel command shows the previous runlevel or N for newly booted. Therefore, the only options that this runlevel command would show on an older Debian-based Linux distribution system, which uses SysV init

93
Q

You’ve recently become the system administrator for an older Linux server, which still uses SysV init. You determine that its default runlevel is 3. What file did you find that information in?

A

For SysV init systems, the default runlevel is stored within the /etc/inittab file within the initdefault record

94
Q

Which directory on an old SysV init system stores the service startup scripts?

A

The directory that stores the service startup scripts for an old (and a new) SysV init system is the /etc/init.d/ directory

95
Q

You are managing a SysV init system and need to perform some emergency maintenance at runlevel 1.To do this, you need to jump runlevels. What command could you employ?

A

Runlevel 1 is also called single user mode. You can employ either the init or telinit command to jump to that runlevel and pass them one of the three following arguments: 1, s, or S

96
Q

A customer has complained that a service on your SysV init system is not working. Which of the following commands is the best command to use to check the service?

A

The best command to use is the service status command, passing the service name to it as an argument. This will display the service’s current status and allow you to start the troubleshooting process quickly

97
Q

You need to enable the DHCP service on your Red Hat–based SysV init system for runlevels 3 and 5. Which of the following commands should you use?

A

To enable the DHCP service on your Red Hat–based SysV init system for runlevels 3 and 5, the correct command to use is the chkconfig –levels 35 dhcp on command

98
Q

You need to enable the DHCP service on your Debian-based SysV init system for the default runlevels. Which of the following commands should you use?

A

To enable the DHCP service on your Debian-based SysV init system for default runlevels, the correct command to use is the update-rc.d dhcp defaults command

99
Q

Which of the following would be the appropriate base name for a mount unit file that mounts a filesystem at the /var/log/ mount point?

A

The mount unit file names are created by having the absolute directory reference’s preceding forward slash (/) removed, subsequent forward slashes are converted to dashes (-), and trailing forward slashes are removed. Mount unit file names also have a .mount extension. Therefore, the mount unit file for the /var/log/ mount point would be var-log.mount

100
Q

You are managing a systemd system and need to create an automount unit file. Which of the following directives should you review to possibly include in this file’s [Automount] section?

A

For systemd automount unit files, the only directives that can be included in the [Automount] file section are Where, DirectoryMode, and TimeOutIdleSec

101
Q

Which two commands set the IP address, subnet mask, and default router information on an interface using the command line?

A

The nmtui command provides an interactive text menu for selecting a network interface and setting the network parameters, and the ip command provides a command-line tool for setting network parameters

102
Q

Which tool do newer versions of Ubuntu use to set network address information?

A

Starting with version 17.04, Ubuntu has switched to using the Netplan tool to set network address information

103
Q

Which command displays the duplex settings for an Ethernet card?

A

The ethtool command displays features and parameters for network cards

104
Q

Which command displays which ports the processes use on Linux systems?

A

The ss command displays a list of the open ports on a Linux system, along with the processes associated with each port

105
Q

If your Linux server doesn’t have a graphical desktop installed, what two tools could you use to configure network settings from the command line?

A

The nmcli and the ip commands both allow you to set and change network settings from the command line

106
Q

What network setting defines the network device that routes packets intended for hosts on remote networks?

A

The default router sends packets from the local network to remote networks, so to communicate with a remote host, you need to define the default router address

107
Q

What device setting defines a host that maps a hostname to an IP address?

A

The DNS server maps the hostname to an IP address, so you must have a DNS server defined in your network configuration to be able to use hostnames in your applications

108
Q

What is used to automatically assign an IP address to a client?

A

The Dynamic Host Configuration Protocol (DHCP) is used to assign dynamic IP addresses to client workstations on a network

109
Q

What type of address is used so local applications can use network protocols to communicate with each other?

A

The loopback address is a special address that is assigned to the loopback interface and allows local applications to communicate with each other

110
Q

Which command would you use to find the mail server for a domain?

A

The dig command can display individual host records for a domain, which you can use to find the MX mail host for the domain

111
Q

What command would you use to find out what application was using a specific TCP port on the system?

A

The ss command can display both open ports and the applications that own them

112
Q

What folder does Red Hat–based systems use to store network configuration files?

A

Red Hat–based systems use separate files to store the IP address and router information. Those files are stored in the /etc/sysconfig/network-scripts folder

113
Q

Which configuration line sets a dynamic IP address for a Debian system?

A

iface eth0 inet dhcp

114
Q

Which file contains a list of DNS servers the Linux system can use to resolve hostnames?

A

The DNS servers are listed in the /etc/resolv.conf configuration file using the nameserver setting

115
Q

Which ifconfig format correctly assigns an IP address and netmask to the eth0 interface?

A

ifconfig eth0 up 192.168.1.50 netmask 255.255.255.0

The ifconfig command must specify the network interface, the IP address, and then the netmask option before the netmask address. You can use the up or down option to place the network card in an active or inactive state by default, but it’s not required

116
Q

What command displays all of the available wireless networks in your area?

A

The iwlist command displays the available wireless network access points detected by the wireless network card

117
Q

What option sets the wireless access point name in the iwconfig command?

A

The SSID value defines the access point name and is set using the essid option in the iwconfig command

118
Q

What command can you use to both display and set the IP address, netmask, and default router values?

A

The ip command allows you to both display and set the IP address, netmask, and default router values for a network interface

119
Q

What tool allows you to send ICMP messages to a remote host to test network connectivity?

A

The ping command sends ICMP packets to a specified remote host and waits for a response

120
Q

Which bonding mode would you use to combine two network interfaces to create a single network interface with double the amount of bandwidth to your Linux server?

A

The aggregation, or mode 4, method of bonding combines the network interfaces to create a single, larger network pipe

121
Q

Which of the following are fields within a /etc/passwd file record?

A

The user account’s username, password (though it typically only contains an x),

and UID are all legitimate fields within a /etc/passwd file record

122
Q

Which of the following are fields within a /etc/shadow file record?

A

The password expiration date, account expiration date, and password are all legitimate fields within a /etc/shadow file record

123
Q

Which field contains the same data for both a /etc/passwd and /etc/shadow file record?

A

The user account’s username is the only field within a /etc/passwd and /etc/shadow record that contains the same data

124
Q

Which of the following commands will allow you to view the NUhura account’s record data in the /etc/passwd file?

A

Though not very efficient, the cat /etc/passwd command would allow you to view the NUhura account’s record within the /etc/passwd file. The grep NUhura /etc/passwd and getent passwd NUhura commands also would allow you to see the NUhura record

125
Q

You use the useradd -D command to view account creation configuration directives. What file does this command pull its displayed information from?

A

The useradd -D command allows you to view the account creation configuration directives within the /etc/default/useradd file

126
Q

You create an account using the appropriate utility, except for some reason the account’s home directory was not created. Which of the following most likely caused this to occur?

A

If the CREATE_HOME directive is not set or it is set to no, then when a user account is created, no home directory will be created by default. Most likely this caused the problem

127
Q

Your boss has asked you to remove KSingh’s account and all his home directory files from the system immediately. Which command should you use?

A

To immediately remove the KSingh account and all his home directory files, using super user privileges, you would use the userdel -r KSingh command

128
Q

Which of the following will allow you to change an account’s /etc/shadow file record data?

A

The passwd, usermod, userdel, and chage commands can all manipulate (or remove) an account’s /etc/shadow file record data in some way

129
Q

Which of the following commands will allow you to switch temporarily from your account’s default group to another group with whom you have membership?

A

The newgrp command will let you switch temporarily from your account’s default group to another group with whom you have membership

130
Q

Which of the following commands is the best one to add JKirk as a member to a new group called the NCC-1701 group and not remove any of the account’s previous group memberships?

A

The usermod -aG NCC-1701 JKirk command would add JKirk to the NCC-1701 group as a member and not remove any of the account’s previous group memberships

131
Q

Which of the following could be used to view the members of the NCC-1701 group?

A

The getent group NCC-1701 and grep NCC-1701 /etc/group commands would both allow you to see the various NCC-1701 group members

132
Q

User environment files typically come from where?

A

The skeleton directory, /etc/skel/, typically contains the user environment files that are copied to the account’s home directory when it is created

133
Q

A user has logged into the tty3 terminal. Which of the following user environment files is executed first if found in the user’s home directory?

A

The .bash_profile user environment file is run first if it is found in the user account’s home directory

134
Q

Which of the following files and directories may be involved in setting up the environment for all system users?

A

/etc/profile
/etc/profile.d/
/etc/bashrc
/etc/bash.bashrc

135
Q

Which of the following commands displays information about the account issuing the command?

A

The whoami, who am i, and id commands will all display information about the current account that is issuing the commands

136
Q

Which of the following commands will display CPU load data along with information concerning users who are currently logged into the system?

A

The w command displays CPU load information for the last 1, 5, and 15 minutes as well as data about users who are currently accessing the system

137
Q

The last command, by default, pulls its data from what file?

A

The last command by default pulls its data from the /var/log/wtmp file

138
Q

Which of the following are options used in the /etc/fstab file to designate a filesystem as one that uses quotas?

A

The usrquota and grpquota are /etc/fstab settings used to enable user and group quotas for a filesystem

139
Q

A problem has occurred concerning group quotas on three filesystems. You need to quickly remove all filesystems’ quota limits to temporarily resolve this issue. What is the best command to employ?

A

To quickly remove quota limits on all filesystems, you would use the quotaoff -a command

140
Q

You need to edit quota grace periods. Which of the following commands should you use?

A

The edquota -t command will edit quota grace periods

141
Q

Which type of storage device uses integrated circuits to store data with no moving parts?

A

The solid-state drive (SSD) storage device uses an integrated circuit to store data

142
Q

What raw device file would Linux create for the second SCSI drive connected to the system?

A

Linux creates files named sdx in the /dev folder for SCSI devices. For the second SCSI device, Linux would create the file /dev/sdb

143
Q

What program runs in the background to automatically detect and mount new storage devices?

A

The udev program runs in the background on Linux systems and detects and mounts storage devices as they’re connected to the system

144
Q

What folder does the udev program use to create a permanent link to a storage device based on its serial number?

A

The udev program creates files in the /dev/disk/by-id folder that are linked to the raw device files for storage devices. These files are identified by manufacturer information, including the serial number assigned to the device

145
Q

Which partitioning tool provides a graphical interface?

A

The GNU gparted program provides a graphical window for managing device partitions

146
Q

Linux uses ___________ to add the file-system on a new storage device to the virtual directory

A

Linux uses mount points to insert a filesystem on a storage device to the virtual directory

147
Q

What filesystem is the latest version of the original Linux filesystem?

A

The ext filesystem was the original filesystem used in Linux, and ext4 is the latest version of it

148
Q

What tool do you use to create a new filesystem on a partition?

A

The mkfs program allows you to create a new filesystem on a partition

149
Q

What tool do you use to manually add a filesystem to the virtual directory?

A

The mount program allows you to insert the filesystem on a partition into the virtual directory

150
Q

The __________ program is a handy tool for repairing corrupt filesystems

A

The fsck program repairs corrupt filesystems

151
Q

Time and space to generate archives are not an issue, and your system’s environment is not a high IO one. You want to create full backups for your system only once per week and need to restore data as quickly as possible. Which backup type plan should you use?

A

Scheduling a full archive weekly and implementing a differential backup daily (which backs up all the data that is new or modified since the last full archive) will meet the requirements

152
Q

The system admin took an archive file and applied a compression utility to it. The resulting file extension is .gz. Which compression utility was used?

A

The gzip utility compresses data files and gives them the .gz file extension

153
Q

You need to quickly create a special archive. This archive will be a single compressed file, which contains any .snar files across the virtual directory structure. Which archive utility should use?

A

To quickly create an archive of disparate files around the virtual directory structure, the best utility to use is the cpio program. This is because you can employ the find command to locate the files and then pipe the results into the cpio utility.

154
Q

An administrator needs to create a full backup using the tar utility, compress it as much as possible, and view the files as they are being copied into the archive. What tar options should the admin employ?

A

The tar options -cJvf will create a tarball using the highest compression utility, xz, and allow the administrator to view the files via the verbose option while they are being copied into the compressed archive

155
Q

You need to create a low-level backup of all the data on the /dev/sdc drive and want to use the /dev/sde drive to store it on. Which dd command should you use?

A

dd of=/dev/sde if=/dev/sdc

156
Q

You need to create a backup of a user directory tree. You want to ensure that all the file metadata is retained. Employing super user privileges, which of the following should you use with the rsync utility?

A

The -a switch allows you to recursively back up a directory tree and preserves all the file metadata. It is equivalent to using the -rlptgoD switches

157
Q

You decide to compress the archive you are creating with the rsync utility and employ the -z option. Which compression method are you using?

A

When you use the -z switch in conjunction with the rsync utility, you are employing compression from the zlib library

158
Q

Which of the following is true concerning the scp utility?

A

Well suited for quickly transferring files between two systems on a network

Is faster than the sftp utility

Uses OpenSSH for file transfers

159
Q

You are transferring files for a local backup using the sftp utility to a remote system and the process gets interrupted. What sftp utility command should you use next?

A

The reput command will resume your interrupted operation of uploading a local backup to a remote system

160
Q

You have completed a full archive and sent it to a remote system using the sftp utility. You employ the md5sum program on both the local archive and its remote copy. The numbers don’t match. What most likely is the cause of this?

A

In this scenario, the most likely cause is that the archive got corrupted when it was transferred to the remote system

161
Q

What permissions can be applied to a file or directory?

A

The basic Linux security permissions that you can set are read, write, and execute access

162
Q

What user categories can be assigned permissions in Linux?

A

The three categories Linux uses for assigning permissions are the owner, the group, and all others on the system

163
Q

Sam needs to allow standard users to run an application with root privileges. What special permissions bit should she apply to the application file?

A

The Set User ID bit (SUID) allows all users to run applications as the root user account

164
Q

What are the equivalent symbolic mode permissions for the octal mode value of 644?

A

The octal mode permission 644 represents read/write for the owner and read only for the group and other categories. In symbolic mode that would be rw-r–r–

165
Q

Fred was assigned the task of creating a new group on the company Linux server and now needs to assign permissions for that group to files and directories. What Linux utility should he use to change the group assigned to the files and directories?

A

The chgrp command is used to change the group assigned to a file or directory; however, you can also specify a new group with the chown command to change the owner and the group at the same time

166
Q

Sally needs to view the ACL permissions assigned to a file on her Linux server. What command should she use?

A

The getfacl command retrieves all of the ACL permissions assigned to a file or directory

167
Q

What SELinux mode tracks policy violations but doesn’t enforce them?

A

The permissive mode in SELinux logs policy violations but doesn’t prevent the action from happening

168
Q

Ted is tasked with documenting the SELinux security context assigned to a group of files in a directory. What command should he use?

A

ls -Z

The -Z option of the ls command displays the SELinux security context assigned to a file or directory

169
Q

Mary is required to log into her Linux system as a standard user but needs to run an application with administrator privileges. What commands can she use to do that?

A

The su command allows you to run an application as another user, including the root user account, and the sudo command allows you to run an application as the root user account

170
Q

What user groups are commonly used to assign privileges for group members to run applications as the administrator?

A

Red Hat–based distributions use the wheel group and Debian-based distributions use the sudo group to allow members to gain administrator privileges on the system to run applications

171
Q

For an application to use PAM, it needs to be compiled with which PAM library?

A

For an application to use PAM, it must be compiled with the libpam (also called libpam.so) library

172
Q

Which of the following are PAM control flags?

A

requisite, required, sufficient, and optional are all PAM control flags you may find in a PAM /etc/pam.d/ configuration file

173
Q

Which of the following will display failed login attempts?

A

The pam_tally2 and faillock commands display failed login attempts

174
Q

Leigh encrypts a message with Luke’s public key and then sends the message to Luke. After receiving the message, Luke decrypts the message with his private key. What does this describe?

A

Asymmetric, or public/private, key encryption involves a message sender encrypting a message with the receiver’s public key. When the receiver obtains the encrypted message, it is then decrypted using the receiver’s private key

175
Q

Which of the following best describes a digital signature?

A

An original plaintext hash, which is encrypted with a private key and sent along with the cipher text

176
Q

The OpenSSH application keeps track of any previously connected hosts and their public keys in what file?

A

The OpenSSH application keeps track of any previously connected hosts and their public keys in each user’s ~/.ssh/known_hosts file

177
Q

Which of the following are OpenSSH configuration files?

A

The ~./ssh/config,
/etc/ssh/ssh_config
/etc/ssh/sshd_config

files are all OpenSSH configuration files

178
Q

Which of the following files may be involved in authenticating with SSH keys?

A

~/.ssh/id_rsa

179
Q

Which of the following is true concerning TCP wrappers?

A

The /etc/hosts.allow file is consulted first.

If an application is compiled with the libwrap library, it can employ TCP wrappers.

IP addresses of remote systems can be listed individually or as entire subnets.

TCP wrappers are considered to be deprecated by many distributions and firewalls should be used instead.

180
Q

Which of the following protocols or frameworks might be involved in using VPN software as a client?

A

SSL/TLS
IPSec
DTLS