Study Guide - Assessment Test Flashcards

(91 cards)

1
Q

3- The cat -n File.txt command is entered at the command line. What will be the result?

  • The text file File.txt will be displayed.
  • The text file File.txt will be displayed along with any special hidden characters in the file.
  • The text file File.txt will be displayed along with any special symbols representing end‐of‐line characters.
  • The text file File.txt will be displayed along with line numbers.
  • The text file File.txt will be displayed in reverse order.
A

The text file File.txt will be displayed along with line numbers.

The cat -n File.txt command will display the File.txt text file along with line numbers. Therefore, option D is correct. The command in option A will simply display the File.txt file. Thus, option A is a wrong answer. To see any special hidden characters within the File.txt file, you would need to enter the command cat -A File.txt. Therefore, option B is an incorrect choice. End‐of‐line characters need a different cat command option, such as the -E switch. Therefore, option C is a wrong choice. The cat command does not have a switch that will allow a text file’s contents to be displayed in reverse order. Thus, option E is an incorrect choice.

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

4- Which of the following are stream editors? (Choose all that apply.)

  • vim
  • sed
  • awk
  • gawk
  • nano
A
  • sed
  • awk
  • gawk

The sed, awk, and gawk utilities are all stream editors. Therefore, options B, C, and D are correct. Both vim and nano are considered to be text editors. Therefore, options A and E are incorrect choices.

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

Stream Editors

A

A stream editor is a type of text processing utility that works by taking an input stream (such as a file or pipeline input), performing specified text transformations line by line, and then outputting the result to standard output.

Key characteristics of a stream editor in Linux include:
* Non-interactive processing: Unlike text editors like vim or nano, stream editors don’t provide an interactive interface. They apply edits automatically based on provided commands.
* Line-by-line operation: Stream editors process text sequentially, one line at a time, making them memory efficient even for large files.
* Filter behavior: They typically act as filters in a pipeline, receiving input, transforming it, and passing the result forward.
* Regular expression support: Most stream editors use regular expressions for pattern matching and text manipulation.
Script-friendly: They’re designed to be used in shell scripts and automation rather than manual editing.

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

sed

A

sed (Stream Editor) is a powerful command-line utility in Linux used for parsing and transforming text. It’s designed to perform basic text transformations on an input stream or file without requiring interactive editing

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

awk

A

awk is a powerful text processing tool in Linux, designed specifically for data extraction and reporting. It’s named after its creators: Aho, Weinberger, and Kernighan

Unlike sed which is primarily for substitutions and editing, awk excels at more complex data manipulation tasks where field-based processing is needed.

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

gawk

A

gawk (GNU awk) is the GNU Project’s implementation of the awk programming language in Linux. It’s a more feature-rich version of the standard awk utility

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

5- Which command in GRUB2 defines the location of the /boot folder to the first partition on the first hard drive on the system?

  • set root=hd(0,1)
  • set root=hd(1,0)
  • set root=hd(1,1)
  • set root=hd(0,0)
  • set root=first
A

set root=hd(0,1)

GRUB2 identifies the hard drives starting at 0, but the partitions start at 1, so the first partition on the first hard drive would be 0,1 and option A is correct. Option B (1,0) defines the second hard drive and an incorrect partition number, so it is incorrect. Option C defines the first partition but the second hard drive, so it is incorrect. Option D defines the first hard drive but an incorrect partition, so it is incorrect. Option E uses the keyword first, which is not recognized by GRUB2, so it is incorrect.

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

6- If you see read or write errors appear in the system log, what tool should you use to correct any bad sections of the hard drive?

mount
unmount
fsck
dmesg
mkinitrd

A

fsck

The fsck program can perform a filesystem check and repair multiple types of filesystems on partitions, so option C is correct. The mount program is used to append a partition to a virtual directory; it can’t correct a partition that contains errors, so option A is incorrect. The unmount command removes a partition from the virtual directory, so option B is incorrect. Option D (the dmesg command) displays boot messages, and option E (the mkinitrd command) creates an initrd RAM disk, so both are incorrect.

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

fsck

A

fsck (File System Consistency Check)

Utility that checks and repairs Linux filesystem inconsistencies
Commonly used after improper shutdowns to ensure filesystem integrity

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

dmesg

A

dmesg (Display Message)

Displays kernel ring buffer messages, showing system startup and hardware detection information
Useful for troubleshooting hardware issues and viewing kernel boot messages

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

mkinitrd

A

mkinitrd (Make Initial RAM Disk)

Creates an initial RAM disk image used during the Linux boot process
Loads necessary modules and drivers before the main filesystem is mounted

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

7- The init program is started on a Linux system and has a process ID number. What typically is that process’s ID number?

  • 0
  • 1
  • 2
  • 10
  • Unknown
A

1

The init program is typically started immediately after the Linux system has traversed the boot process, and it has a process ID (PID) number of 1. Therefore, option B is the correct answer. The Linux kernel has the 0 PID number, and thus, option A is a wrong answer. Options C, D, and E are also incorrect choices.

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

8- You need to determine the default target of a systemd system. Which of the following commands should you use?

  • grep initdefault /etc/inittab
  • runlevel
  • systemctl is-enabled
  • systemd get-target
  • systemctl get-default
A

systemctl get-default

The systemctl get-default command will display a systemd system’s default target. Therefore, option E is the correct answer. The grep initdefault /etc/inittab command will extract the default runlevel for a SysV init system. Thus, option A is a wrong answer. The runlevel command will display a SysV init system’s previous and current runlevel. Therefore, option B is an incorrect answer. The systemctl is-enabled command shows whether or not a particular service, whose name is passed as a command argument, is configured to start at system boot. Thus, option C is a wrong choice. Option D is a made‐up command and therefore the wrong answer.

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

9- The Cinnamon desktop environment uses which window manager?

  • Mutter
  • Muffin
  • Nemo
  • Dolphin
  • LightDM
A

Muffin

The Cinnamon desktop environment uses the Muffin window manager. Therefore, option B is the correct answer. Mutter is the window manager for the GNOME Shell desktop environment, though Muffin did fork from that project. Thus, option A is a wrong answer. Nemo is the file manager for Cinnamon, and therefore, option C is a wrong choice. Dolphin is the file manager for the KDE Plasma desktop environment. Thus, option D is a wrong choice. LightDM is the display manager for Cinnamon, and therefore, option E is also an incorrect choice.

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

Mutter

A

The Cinnamon desktop environment uses the Muffin window manager.

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

Muffin

A

Muffin

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

Nemo

A

Nemo is the file manager for Cinnamon desktop environment

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

Dolphin

A

Dolphin is the file manager for the KDE Plasma desktop environment.

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

LightDM

A

LightDM is the display manager for Cinnamon desktop environment

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

10- Your X11 session has become hung. What keystrokes do you use to restart the session?

  • Ctrl+C
  • Ctrl+Z
  • Ctrl+Q
  • Ctrl+Alt+Delete
  • Ctrl+Alt+Backspace
A

Ctrl+Alt+Backspace

The Ctrl+Alt+Backspace will kill your X11 session and then restart it, putting you at the login screen (display manager.) Therefore, option E is the correct answer. The Ctrl+C combination sends an interrupt signal but does not restart an X11 session. Thus, option A is a wrong answer. The Ctrl+Z keystroke combination sends a stop signal, but it will not restart the X11 session. Therefore, option B is also an incorrect answer. The Ctrl+Q combination will release a terminal that has been paused by Ctrl+S. However, it does not restart an X11 session, so it too is a wrong choice. The Ctrl+Alt+Delete keystroke combination can be set to do a number of tasks, depending on your desktop environment. In some cases, it brings up a shutdown, logout, or reboot menu. However, it does not restart the X11 session, so option D is an incorrect choice.

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

11- What folder contains the time zone template files in Linux?

/etc/timezone
/etc/localtime
/usr/share/zoneinfo
/usr/share/timezone
/usr/share/localtime

A

/usr/share/zoneinfo

Both Debian‐based and Red Hat–based Linux distributions store the time zone template files in the /usr/share/zoneinfo folder, so option C is correct. The /etc/timezone and /etc/localtime files contain the current time zone file for Debian‐ and Red Hat–based systems, not the time zone template files, so options A and B are incorrect. The /usr/share/timezone and /usr/share/localtime folders don’t exist in either Debian‐based or Red Hat–based Linux distributions, so options D and E are also incorrect.

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

12- What systemd command allows you to view and change the time, date, and time zone?

  • timedatectl
  • localectl
  • date
  • time
  • locale
A

timedatectl

The timedatectl program is part of the systemd package and allows you to both view and change the current time, date, and time zone for the Linux system, so option A is correct. The localectl program is also part of the systemd package, but it handles localization information and not time and date information, so option B is incorrect. The date command allows you to view and change the time and date but not the time zone setting, so option C is incorrect. The time command displays the elapsed CPU time used by an application, not the current time, date, and time zone, so option D is incorrect. The locale command allows you to view the localization settings for the Linux system, not the time, date, or time zone, so option E is also incorrect.

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

13- Which of the following files contain user account creation directives used by the useradd command? (Choose all that apply.)

  • The /etc/default/useradd file
  • The /etc/useradd file
  • The /etc/adduser.conf file
  • The /etc/login.defs file
  • The /etc/login.def file
A
  • The /etc/default/useradd file
  • The /etc/login.defs file

The /etc/default/useradd file and /etc/login.defs file are files that contain user account creation directives used by the useradd command. Therefore, options A and D are the correct answers. Option B’s /etc/useradd file is a made‐up file name, and thus option B is a wrong choice. The /etc/adduser.conf file is only on Linux distributions that use the adduser utility to create accounts. Thus, option C is an incorrect answer. The /etc/login.def file is a made‐up file name, and thus option E is also an incorrect choice.

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

14- You need to display the various quotas on all your filesystems employing quota limits. Which of the following commands should you use?

edquota -t
quotaon -a
quotacheck -cu
quotacheck -cg
repquota -a

A

repquota -a

The repquota -a command will display the various quotas on all your filesystems employing quota limits. Therefore, option E is the correct answer. The edquota -t command will edit quota grace periods for the system. Therefore, option A is a wrong answer. The quotaon -a command will automatically turn on quotas for all mounted non‐NFS filesystems in the /etc/fstab file, but it does not display filesystems’ quotas. Thus, option B is an incorrect choice. The quotacheck utility creates either the aquota.group file, if the -cg options are used, or the aquota.user file, if the -cu switches are used, or both files if -cug is employed. However, it does nothing for displaying filesystems’ quotas. Thus, options C and D are incorrect answers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
edquota
* Command to edit user and group disk quotas using a text editor * Allows setting soft limits, hard limits, and grace periods for disk usage
26
quotaon
* Activates the quota system for specified filesystems * Enables enforcement of previously configured disk quotas
27
repquota
* Generates reports on disk usage and quotas for users and groups * Displays current usage statistics relative to set quota limits
28
quotacheck
* Scans filesystems and creates or updates quota database files * Rebuilds quota tables to ensure they accurately reflect current disk usage
29
15- What drive and partition does the raw device file /dev/sdb1 reference? * The first partition on the second SCSI storage device * The second partition on the first SCSI storage device * The first partition on the second PATA storage device * The second partition on the first PATA storage device * The second partition on the second SATA storage device
**The first partition on the second SCSI storage device** Option A is the correct answer because Linux uses the /dev/sdxx format for SCSI and SATA raw devices. The device is represented by a letter, starting with a, and the partition is represented by a number, starting at 1. So /dev/sdb1 references the first partition on the second SCSI or SATA device. Option B would be referenced by the /dev/sda2 file, so it is incorrect. Option C would be referenced by the /dev/hdb1 file, so it is incorrect. Option D would be referenced by /dev/hda2, so option D is incorrect, and option E would be referenced by /dev/sdb2, so it is incorrect.
30
16- What tool creates a logical volume from multiple physical partitions? * mkfs * pvcreate * lvcreate * fdisk * vgcreate
**lvcreate** The lvcreate program creates a logical volume from multiple partitions that you can use as a single logical device to build a file system and mount it to the virtual directory, so option C is correct. The mkfs program creates a filesystem on a partition but doesn’t create a logical volume, so option A is incorrect. The pvcreate program identifies a physical volume from a partition but doesn’t create the logical volume, so option B is incorrect. The fdisk program creates and modifies physical partitions, not logical volumes, so option D is incorrect. The vgcreate program creates a volume group for grouping physical partitions but doesn’t create the logical volume, so option E is incorrect.
31
vgcreate
* Creates a volume group from one or more physical volumes in LVM * Acts as a container for logical volumes and manages physical storage allocation
32
fdisk
* Partition table manipulator for creating, deleting, and modifying disk partitions * Traditional text-based tool for disk partitioning operations
33
lvcreate
* Creates logical volumes within a volume group * Allows specifying size, name, and other attributes for the logical volume
34
pvcreate
* Initializes physical volumes for use with Logical Volume Manager (LVM) * Prepares disks or partitions to become part of volume groups
35
mkfs
* Creates a new filesystem on a disk partition or device * Supports various filesystem types (ext4, xfs, etc.) via format mkfs.type
36
17- Which of the following can be used as backup utilities? (Choose all that apply.) * The gzip utility * The zip utility * The tar utility * The rsync utility * The dd utility
* **The zip utility** * **The tar utility** * **The rsync utility** * **The dd utility** The zip, tar, rsync, and dd utilities all can be used to create data backups. Therefore, options B, C, D, and E are correct answers. The gzip utility can be used after a backup is created or employed through tar options to compress a backup, so option A is the only wrong choice.
37
21- The lsmod utility provides the same information as what other utility or file(s)? * The modinfo utility * The /proc/modules file * The /etc/modules.conf file * The insmod utility * The /run/modprobe.d/*.conf files
**The /proc/modules file** The /proc/modules file has the same information that is displayed by the lsmod utility (though the lsmod utility formats it much nicer). Therefore, option B is the correct answer. The modinfo utility provides detailed module data, whereas lsmod shows only brief information. Thus, option A is a wrong answer. The /etc/modules.conf file is a kernel module configuration file, and it does not provide the same information as the lsmod utility. Therefore, option C is also an incorrect answer. The insmod command is used to dynamically load kernel modules, and thus it is a wrong answer. The /run/modprobe.d/ * .conf files are kernel module configuration files, and they do not provide the same information as the lsmod utility. Therefore, option E is also an incorrect choice.
38
insmod
used to dynamically load kernel module
39
22- Which utility should be used to remove a module along with any dependent modules? * The rmmod utility * The modinfo utility * The cut utility * The depmod utility * The modprobe utility
**The modprobe utility** The modprobe utility along with its -r switch is the utility to employ for removing (unloading) a kernel module along with any of its dependencies. Therefore, option E is the correct answer. The rmmod utility will remove a kernel module but not any of its dependencies. Thus, option A is a wrong answer. The modinfo command does not unload kernel modules but instead displays detailed information concerning a specified module. Therefore, option B is an incorrect choice. The cut utility is used to filter text files and display the filtered text to STDOUT. It is not involved in kernel module removal, and thus option C is a wrong choice. The depmod utility is used to create a list of modules and their dependencies, but it is not used to remove modules. Therefore, option D is an incorrect choice.
40
rmmod
remove a module but not its dependencies
41
modinfo
displays detailed information concerning a specified module
42
depmod
used to create a list of modules and their dependencies
43
What special bit should you set to prevent users from deleting shared files created by someone else? * SUID * GUID * Sticky bit * Read * Write
Sticky bit The sticky bit assigned to a directory restricts all of the files in that directory so that only the file owner can delete the file, even if a user account is in the group that has write permissions, so option C is correct. The SUID bit allows a standard user to run an application with the file owner permissions but doesn’t block users from deleting shared files, so option A is incorrect. The GUID bit is used on a directory to ensure that all files created in the directory have the same group as the directory, but it doesn’t prevent users in that group from deleting files, so option B is incorrect. The Read and Write standard permission bits control access to read to a file or write to a file, but they don’t block users from deleting a file, so options D and E are both incorrect.
44
GUID
Group User ID * Special permission that allows a user to execute a file with the permissions of the file's group * Set with chmod g+s and appears as an "s" in the group execute permission field
45
SUID
Set User ID * Permission that enables a program to run with the privileges of the file owner, not the user executing it * Set with chmod u+s and commonly used for programs that require elevated privileges
46
Sticky Bit
* Special permission primarily used on directories to restrict file deletion * When set, only the file owner, directory owner, or root can delete files, even if others have write permissions * Set with chmod +t and appears as a "t" in the others execute permission field
47
25- Which directory contains the various PAM configuration files? * The /etc/pam/ directory * The /etc/pam_modules/ directory * The /etc/modules/ directory * The /etc/pam.d/ directory * The /etc/pam_modules.d/ directory
**The /etc/pam.d/ directory** The /etc/pam.d/ directory contains the various PAM configuration files. Therefore, option D is the correct answer. The other directory names are made up. Thus, options A, B, C, and E are incorrect answers.
48
26- Which of the following can override the settings in the ~/.ssh/config file? * The settings in the /etc/ssh/ssh_config file. * The ssh utility’s command‐line options. * You cannot override the settings in this file. * The settings in the /etc/ssh/sshd_config file. * The settings in the sshd daemon’s configuration file.
**The ssh utility’s command‐line options.** The settings within the ~/.ssh/config file can be overridden by various ssh utility options provided at the command line. Therefore, option B is the correct answer. The settings in the /etc/ssh/ssh_config file can be overridden by both the settings in the ~/.ssh/config file and the ssh utility’s command‐line options, so option A is a wrong answer. The /etc/ssh/sshd_config file is the sshd daemon’s configuration file, and it deals with providing the SSH services, not in setting the configuration for the SSH client. Therefore, both options D and E are incorrect choices.
49
PAM
**Pluggable Authentication Modules in Linux PAM is a flexible authentication framework that allows Linux system administrators to configure how applications authenticate users. ** Key aspects include: * A modular system that separates authentication mechanisms from applications, enabling changes to authentication methods without modifying applications * Configured through files in /etc/pam.d/ that define authentication rules for different services * Provides four primary module types: authentication (auth), account management, password management, and session management * Allows for stacking multiple authentication methods (like password, biometrics, smart cards) for the same application Enables centralized authentication policy across the system Supports integration with various authentication backends including LDAP, Active Directory, and local user databases PAM has become the standard authentication framework in most Linux distributions, making it easier to implement and manage complex authentication requirements.
50
28- What command do you use to display entries in the systemd-journald journal? * journalctl * syslogd * klogd * systemd-journald * vi
**journalctl** The systemd-journald application uses its own binary file format for the journal file and requires the journalctl file to read it, so option A is correct. The syslogd and klogd applications are syslog loggers and not able to read the systemd-journald journal file, so options B and C are incorrect. The systemd-journald application itself only adds event messages to the journal and doesn’t read it, so option D is incorrect. Since the journal file is in binary format, you can’t read it using standard text editor programs, so option E is incorrect.
51
29- The /etc/services file may be used by firewalls for what purpose? * To designate what remote services to block * To store their ACL rules * To map a service name to a port and protocol * To determine if the port can be accessed * To designate what local services can send out packets
**To map a service name to a port and protocol** The /etc/services file may be used by a firewall, such as UFW, to map a particular service name to its port and protocol. Thus, option C is the correct answer. The file is not used to designate remote services to block or store a firewall’s ACL rules. Therefore, options A and B are wrong answers. The Linux firewall applications do not use the /etc/services file to determine if a port can be accessed or what local services can send out packets. Thus, options D and E are incorrect choices.
52
30- Which of the following is true about netfilter? (Choose all that apply.) * It is used by firewalld. * It is used by UFW. * It provides code hooks into the Linux kernel for firewall technologies to use. * It is used by iptables. * It provides firewall services without the need for other applications.
* **It is used by firewalld.** * **It is used by UFW.** * **It provides code hooks into the Linux kernel for firewall technologies to use**. * **It is used by iptables.** Used by firewalld, UFW, and iptables, netfilter provides code hooks into the Linux kernel for firewall technologies to use in order to implement fully functional firewall capabilities. Therefore, options A, B, C, and D are all correct answers. Unfortunately, netfilter cannot provide firewall services on its own. Thus, option E is the only incorrect choice.
53
Which of the following is a measurement of the maximum amount of data that can be transferred over a particular network segment? * Bandwidth * Throughput * Saturation * Latency * Routing
**Bandwidth** Bandwidth is a measurement of the maximum data amount that can be transferred between two network points over a period of time. Therefore, option A is the correct answer. Throughput is a measurement of the actual data amount that is transferred between two network points, and thus option B is a wrong answer. Saturation occurs when network traffic exceeds capacity, but it is not a measurement. Thus, option C is an incorrect answer. Latency is the time between a source sending a packet and the packet’s destination receiving it. Therefore, option D is a wrong choice. Routing is the process of forwarding IP packets to the appropriate destination. Thus, option E is also an incorrect answer.
54
Throughput
a measurement of the actual data amount that is transferred between two network points
55
Saturation
occurs when network traffic exceeds capacity, but it is not a measurement
56
Latency
Latency is the time between a source sending a packet and the packet’s destination receiving it
57
Bandwidth
A measurement of the maximum data amount that can be transferred between two network points over a period of time
58
32- Which tool will allow you to view disk I/O specific to swapping? * ipcs -m * cat /proc/meminfo * free * swapon -s * vmstat
**vmstat** The vmstat utility provides a lot of memory statistics, including disk I/O specific to swapping. Therefore, option E is the correct answer. The ipcs -m command allows you to see shared memory segments instead of disk I/O specific to swapping. Thus, option A is the wrong answer. The cat /proc/meminfo command displays detailed information concerning a system’s RAM. Therefore, option B is an incorrect answer. The free command shows memory items such as free memory, used memory, and buffer/cache usage. Thus, option C is a wrong choice. The swapon -s command displays swap space elements such as type, name, and priority. Therefore, option D is also an incorrect choice.
59
ipcs
* Displays information about active inter-process communication (IPC) facilities * Shows details about shared memory segments, message queues, and semaphore arrays * The ipcs -m command allows you to see shared memory segments
60
swapon
* Activates swap space devices or files for virtual memory use * Can display currently active swap areas when used with the -s option * The swapon -s command displays swap space elements such as type, name, and priority
61
lsof
**List Open Files** * Lists all open files and the processes that opened them * Powerful diagnostic tool for identifying which processes are using specific files, directories, or network connections * Helps troubleshoot issues like "device busy" errors or identifying processes holding file locks
62
34- What command‐line commands allow you to send process signals to running applications? (Choose two.) * renice * pkill * nice * kill * pgrep
* **pkill** * **kill** The pkill and kill commands allow you to send Linux process signals to running applications, so options B and D are correct. The renice command allows you to change the priority level of a running application but not send process signals to it, so option A is incorrect. The nice command allows you to start an application with a specified priority level but not send process signals to applications that are already running, so option C is incorrect. The pgrep command allows you to display running applications, but it doesn’t send process signals to them, so option E is incorrect.
63
renice
* Changes the priority (nice value) of running processes * Allows adjusting process scheduling priority without restarting the process
64
nice
* Starts a program with a modified scheduling priority (niceness) * Higher nice values result in lower process priority, being "nicer" to other processes
65
pgrep
* Searches for processes by name, user, or other attributes and returns their PIDs * Useful for scripting and for finding process IDs without using complex grep commands
66
35- Annika puts the file line PS1="My Prompt: " into her account’s $HOME/.bash_profile file. This setting changes her prompt the next time she logs into the system. However, when she starts a subshell, it is not working properly. What does Annika need to do to fix this issue? * Add the file line to the $HOME/.profile file instead. * Nothing. A user’s prompt cannot be changed in a subshell. * Add export prior to PS1 on the same line in the file. * Change her default shell to /bin/dash for this to work. * Change the last field in her password record to /sbin/false.
**Add export prior to PS1 on the same line in the file.** The problem is directly related to a missing export command prior to the PS1="My Prompt: " in Annika’s environment file. When this environment variable is exported and when it is set, it will be set in any started subshells. Thus, option C is the correct answer. Since Annika’s environment file exists, the $HOME/.profile file is not used. Thus, option A is a wrong answer. A user prompt can be changed in a subshell, so option B is also an incorrect answer. Changing Annika’s default shell will not fix this issue, so option D is a wrong choice. If Annika changes the last field in her password record to /sbin/false, she will no longer be able to log into the system using her account. Therefore, option E is an incorrect choice.
67
Subshell
**A subshell in Linux is a child shell process that's spawned by the current shell.** Key aspects include: * It's a separate execution environment that inherits environment variables, functions, and aliases from the parent shell * Changes made to variables, working directory, or environment within a subshell don't affect the parent shell * Created automatically when commands are grouped with parentheses (command1; command2) or when running commands in the background with & * Also created when using command substitution with backticks `command` or $(command) * Pipe operations (|) typically create subshells for each command in the pipeline * Useful for isolating operations that should not affect the current shell environment * Has its own process ID distinct from the parent shell **Subshells are an important concept for understanding process isolation and environment inheritance in shell scripting.**
68
37- Which directories contain dynamic files that display kernel and system information? (Choose two.) * /dev * /proc * /etc * /sys * /dev/mapper
* **/proc** * **/sys** The Linux kernel uses the /proc and /sys directories to produce dynamic files that contain information about the kernel and system, so options B and D are correct. The /dev folder contains files for communicating with devices, not kernel and system information, so option A is incorrect. The /etc directory contains application configuration files, not files created by the kernel for displaying kernel and system information, so option C is incorrect. The /dev/mapper directory is used for virtual files mapped to physical device files for LVM and LUKS, not kernel information, so option E is incorrect.
69
39- What directory contains configuration information for the X Windows System in Linux? * /dev * /proc * /etc/X11 * /sys * /proc/interrupts
**/etc/X11** The /etc/X11 directory contains configuration files used by both the X.org and XFree86 applications for controlling the X Windows graphical environment on the Linux system, so option C is correct. The /dev directory contains device files used to send and receive data from devices, not the X Windows configuration files, so option A is incorrect. The kernel uses the /proc and /sys directories to create dynamic files that show kernel and system information, not contain X Windows configuration files, so options B and D are incorrect. The /proc/interrupts file contains information about hardware interrupts currently used by hardware devices on the system, not X Windows configuration files, so option E is incorrect.
70
40- Peter is trying to complete his network application, Spider, but is running into a problem with accessing a remote server’s files and there are no network problems occurring at this time. He thinks it has something to do with the remote server’s ACLs being too restrictive. You need to investigate this issue. Which of the following might you use for troubleshooting this problem? (Choose all that apply.) * The firewall-cmd command * The ufw command * The iptables command * The getacl command * The setacl command
* **The firewall-cmd command** * **The ufw command** * **The iptables command** Since the problem involves a remote server, you need to investigate the firewall access control lists (ACLs) on both the local and remote systems. Therefore, depending on the firewall employed, you can use the firewall-cmd, ufw, or iptables command in the troubleshooting process. Thus, options A, B, and C are the correct answers. The getacl and setacl commands deal with file inheritance issues, and therefore options D and E are incorrect choices.
71
getfacl (book says: getacl)
* Displays file and directory Access Control Lists (ACLs) * Shows extended permissions beyond the standard user/group/other model
72
setfacl (book says: setacl)
* Sets or modifies Access Control Lists (ACLs) on files and directories * Allows fine-grained permission control beyond traditional permission bits
73
42- Which environment variable allows you to retrieve the numeric user ID value for the user account running a shell script? * $USER * $UID * $BASH * $HOME * $1
**$UID** The $UID environment variable contains the numeric user ID value of the user account running the shell script, so option B is correct. The $USER environment variable contains the text user name of the user account running the shell script, not the numerical user ID value, so option A is incorrect. The $BASH environment variable contains the path to the executable Bash shell, so option C is incorrect. The $HOME environment variable contains the location of the home directory of the user account running the shell, so option D is incorrect. The $1 positional variable contains the first parameter listed on the command‐line command when the shell script was run, so option E is incorrect.
74
44- When will the cron table entry 0 0 1 * * myscript run the specified command? * At 1 a.m. every day * At midnight on the first day of every month * At midnight on the first day of every week * At 1 p.m. every day * At midnight every day
**At midnight on the first day of every month** The cron table format specifies the times to run the script by minute, hour, day of month, month, and day of week. Thus the format 0 0 1 * * will run the command at 00:00 (midnight) on the first day of the month for every month. That makes option B correct, and options A, C, D, and E incorrect.
75
45- Which of the following packages will provide you with the utilities to set up Git VCS on a system? * git-vcs * GitHub * gitlab * Bitbucket * git
**git** This git package provides utilities to set up Git VCS on a system, so option E is the correct answer. The git-vcs package is made up, so option A is a wrong answer. The GitHub, gitlab, and Bitbucket packages are also made up, but they have similar names as cloud‐based remote repositories used with Git (GitHub, GitLab, BitBucket). Therefore, options B, C, and D are also incorrect choices.
76
46- If you do not tack on the -m option with an argument to the git commit command, what will happen? * The command will throw an error message and fail. * The commit will take place, but no tracking will occur. * You are placed in an editor for the COMMIT_EDITMSG file. * Your commit will fail, and the file is removed from the index. * Nothing. This is an optional switch
**You are placed in an editor for the COMMIT_EDITMSG file.** If the -m option with an argument is not tacked onto the git commit command, you are placed into the vim editor to edit the COMMIT_EDITMSG file. Thus, option C is the correct answer. All the other options are made up and therefore incorrect.
77
47- At a virtualization conference, you overhear someone talking about using blobs on their cloud‐based virtualization service. Which virtualization service are they using? * Amazon Web Services * KVM * Digital Ocean * GitHub * Microsoft Azure
**Microsoft Azure** The Microsoft Azure cloud‐based virtualization service provides blobs, which are large unstructured data storage that is offered over the Internet and can be manipulated with .NET code. Therefore, option E is the correct answer. Amazon Web Services (AWS) and Digital Ocean are both cloud‐based virtualization services, but they do not employ storage called blob, so options A and C are wrong answers. KVM is a hypervisor, not a cloud‐based virtualization service, so option B is an incorrect answer. GitHub is a cloud‐based remote repository used in version control, so option D is also an incorrect choice.
78
48- What is a networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs? * Thick provisioning * Thin provisioning * SDN * NAT * VLAN
**SDN** A software‐defined network (SDN) is a networking method for controlling and managing network communications via software that consists of a controller program as well as two APIs. Thus, option C is the correct answer. Thick provisioning and thin provisioning refer to virtual storage configurations, not networking methods, so options A and B are wrong answers. Network address translation (NAT) is a virtualization network adapter configuration, which operates similarly to a NAT router in a network. Therefore, option D is an incorrect answer. A VLAN is a virtual (logical) LAN configuration, and thus, option E is an incorrect choice as well.
79
49- Your company decides it needs an orchestration system (also called an engine). Which of the following is one you could choose? (Choose all that apply.) * Mesos * Kubernetes * Splunk * Swarm * AWS
* **Kubernetes** * **Swarm** Only Kubernetes and Swarm are orchestration systems. Therefore, options B and D are correct answers. Mesos needs Marathon to implement an orchestration engine, so option A is a wrong answer. Splunk can be used as a monitoring tool in an orchestrated environment, but it is not an orchestration system, so option D is also a wrong choice. Amazon Web Services (AWS) is cloud‐based virtualization services on which you can use orchestration tools, but it is not an orchestration engine. Thus, option E is also an incorrect choice.
80
Mesos
Apache Mesos in Linux * A distributed systems kernel that abstracts CPU, memory, storage, and other resources across clusters * Enables fault-tolerant and elastic distributed systems through a common resource management layer * Functions as a cluster manager that provides efficient resource isolation and sharing across distributed applications/frameworks * Uses marathon toi implement an orchestration engine
81
Swarm
Docker Swarm * Native clustering and orchestration tool for Docker containers * Turns a group of Docker hosts into a single virtual host with built-in load balancing * Provides declarative service management, scaling, and rolling updates for containerized applications
82
Orchestration System
* Automates deployment, scaling, networking, and management of containerized applications * Coordinates multiple services and components across distributed infrastructure * Handles load balancing, service discovery, storage management, and fault tolerance
83
50- Which of the following is used in container orchestration? (Choose all that apply.) Automated configuration management Self‐healing DevOps Agentless monitoring Build automation
* **Automated configuration management** * **Self‐healing** * **Agentless monitoring** * **Build automation** The concepts listed in options A, B, D, and E are all used in container orchestration. While DevOps benefits from container orchestration and often employs it, it is not used within container orchestration. Thus, option C is an incorrect choice.
84
53- What file should you place console and terminal filenames in to prevent users from logging into the Linux system as the root user account from those locations? * /etc/cron.deny * /etc/hosts.deny * /etc/securetty * /etc/login.warn * /etc/motd
**/etc/securetty** The /etc/securetty file provides a list of locations from which users can’t log in using the root user account, so option C is correct. The /etc/cron.deny file prevents users from scheduling jobs, not logging in as the root user account, so option A is incorrect. The /etc/hosts.deny file blocks access from remote network hosts; it doesn’t block root access from local terminals or the console, so option B is incorrect. The /etc/login.warn and /etc/motd files contain messages that are displayed at login time; they don’t block users from logging in as the root user account, so options D and E are incorrect.
85
54- What Linux program logs user file and directory access? * chroot * LUKS * auditd * klist * kinit
**auditd** The auditd program monitors system activity, including user file and directory access, and logs events based on rules you create. Thus, option C is correct. The chroot utility restricts applications to a specific location in the virtual filesystem but doesn’t log user file and directory access, so option A is incorrect. The LUKS system encrypts disk partitions but doesn’t log user file and directory access, so option B is incorrect. The klist and kinit programs are used for Kerberos user authentication, not logging user file and directory access, so options D and E are both incorrect.
86
chroot
* Changes the apparent root directory for a running process and its children * Creates isolated environments for testing, recovery, or security purposes
87
LUKS (Linux Unified Key Setup)
* Standard for disk encryption in Linux, providing strong security for data at rest * Manages multiple passwords, key slots, and supports various cipher modes
88
auditd
* Linux's system auditing daemon that logs system calls and security events * Provides detailed tracking of file access, user activity, and system changes for compliance and security monitoring
89
klist
* Displays Kerberos authentication tickets currently in the user's credential cache * Shows ticket expiration times and encryption types for current Kerberos sessions
90
kinit
* Obtains and caches Kerberos authentication tickets for a user * Establishes identity for accessing Kerberos-secured network services
91
55- You’ve moved your present working directory to a new location in the Linux virtual directory structure and need to go back to the previous directory where you were just located. Which command should you employ? * cd * exit * cd ~ * cd - * return
**cd -** The cd - command will return your process to its previous directory in the virtual directory system, so option D is the correct answer. The cd and cd ~ commands both return your process to your home directory, which was not necessarily the previous directory. Therefore, options A and C are wrong answers. The exit command causes your process to exit its current shell, not return to the previous directory, so option B is also an incorrect answer. The return command is used in Bash shell scripts to return from a function or return from a sourced script. Thus, option E is also an incorrect choice.