Title: IT / LPIC 101 Q/A / 1 System Architecture

Q: Which of the following commands will initiate an immediate shutdown of the system?
shutdown -c
halt
systemd stop
stop-system
A: B. From these options, only B will shut down the system immediately. Option A will cancel a shutdown.

Q: Which option within a systemd service file indicates the program to execute?
StartProgram
ShortCut
ExecStart
Startup
A: C. The ExecStart option indicates the command to be executed on startup of a systemd service.

Q: Which command will display the default target on a computer running systemd?
systemctl defaults
update-rc.d defaults
systemctl runlevel
systemctl get-default
A: D. The systemctl get-default command will show the default target. The other commands and options are not valid.

Q: Which option to the systemctl command will change a service so that it runs on the next boot of the system?
enable
startonboot
loadonboot
start
A: A. The enable option configures the service to start on boot. The start option, D, is used to start a service immediately. The other options are not valid for this command.

Q: Which of the following best describes the /proc filesystem?
/proc contains information about files to be processed.
/proc contains configuration files for processes.
/proc contains information on currently running processes, including the kernel.
/proc contains variable data such as mail and web files.
A: C. The /proc filesystem contains information about currently running processes and additional information about the kernel and current boot of the system.

Q: Which command will retrieve information about the USB connections on a computer in a tree-like format?
lsusb -tree
lsusb --tree
lsusb -t
usblist --tree
A: C. The -t option to lsusb will print output in a tree-like format so that you can see which devices are connected to which bus. The other arguments to lsusb are not valid, and the usblist command is not real.

Q: What is one reason why a device driver does not appear in the output of lsmod, even though the device is loaded and working properly?
The use of systemd means that drivers are not required for most devices.
The use of initramfs means that support is enabled by default.
The system does not need a driver for the device.
Support for the device has been compiled directly into the kernel.
A: D. If a working device does not appear in lsmod, it typically means that the kernel has a driver already loaded by virtue of being compiled into the kernel itself rather than loaded through a module. The use of systemd (option A) or initramfs (option B) has no effect.

Q: Which option to rmmod will cause the module to wait until it’s no longer in use to unload the module?
-test
-f
-w
-unload
A: C. The -w option causes the module to wait until it’s no longer needed prior to unloading. The -f option forces immediate removal and should be used with caution. The other options are not valid for rmmod.

Q: You are using a storage area network (SAN) that keeps causing errors on your Linux system due to an improper kernel module created by the SAN vendor. When the SAN sends updates, it causes the filesystem to be mounted as read-only. Which command and option can you use to change the behavior of the filesystem to account for the SAN bug?
mount --continue
tune2fs -e continue
mkfs --no-remount
mount -o remount
A: B. The tune2fs command can be used for this purpose but should be used with care because it can result in data corruption.

Q: Within which directory are rules related to udev stored?
/etc/udev.conf
/etc/udev.conf.d
/etc/udev/rules.d
/etc/udev.d
A: C. Rules related to udev are stored in /etc/udev/rules.d. The /etc/udev hierarchy contains the udev.conf configuration file along with other components related to the configuration of udev.

Q: Which option to lspci displays the kernel driver in use for the given Peripheral Component Interconnect (PCI) device?
-t
-k
-n
-a
A: B. The -k option shows the kernel driver associated with a given PCI device and can be helpful when planning a new kernel compile. The -t option displays information in a tree-like structure, and -n uses numbers instead of device names. There is no -a option.

Q: Within which of the following directories will you find blacklist information for modules loaded with modprobe?
/etc/blacklist
/etc/modprobe.d
/etc/blacklist.mod
/etc/modprobe
A: B. The /etc/modprobe.d directory is used for storing configuration information related to modules such as that used for blacklisting purposes but also for other configuration information, such as udev and module options.

Q: When working with a CentOS 6 system, which command is used to create the initial RAM disk?
mkinit
dracut
mkraminit
mkinitfs
A: B. The dracut command is used to create the initial RAM disk for newer systems and has replaced the legacy mkinitrd command used for the same purpose.

Q: Within which file will you find a list of the currently available kernel symbols?
/proc/kernelsyms
/etc/kernel.conf
/etc/lsyms
/proc/kallsyms
A: D. The file /proc/kallsyms provides a way to view the currently loaded kernel symbols. This can be helpful for resolving module dependencies. Note that on legacy systems, this file might be called /proc/ksyms.

Q: Which of the following commands can be used to show the various information related to a currently loaded module, including core size and settings for options?
systool -v -m <module>
modinfo -r <module>
lsmod <module>
infmod <module>
A: A. The systool utility can be used to show currently loaded options for a given module. The modinfo -r command is not valid, and though modinfo shows information about a module, it does not include core size and other settings. The lsmod command cannot be used for this purpose, and there is no infmod command.

Q: Which directory contains various elements and configuration information about the kernel such as the release number, domain name, location of modprobe, and other settings?
/proc/sys/kmod
/proc/sys/kernel
/proc/kernel
/proc/kernel/sys
A: B. The /proc/sys/kernel hierarchy contains vital configuration information about a kernel. These settings can be changed on a running system.

Q: Within which directory should systemd unit files that you create be stored?
/etc/system
/etc/systemd/system
/usr/share/systemd
/usr/share/system
A: B. The /etc/systemd/system directory is where it is recommended to store unit files for systemd. The other locations are not valid.

Q: Which of the following commands should you execute after making changes to systemd service configurations in order for those changes to take effect?
systemd reload
reboot
systemctl daemon-reload
systemctl reboot
A: C. The systemctl command will be used for this purpose with the daemon-reload subcommand. The reboot option would work to reload the systemd configuration but is not correct because it requires the entire server to reboot, which is not what was asked in this question.

Q: Which of the following files contains the runlevels for the system along with a reference to the corresponding rc file?
/etc/runlevels
/etc/inittab
/etc/rc
/etc/runlevel
A: B. The /etc/inittab file contains the various runlevels and what to run at the given runlevel. For example, runlevel 1 is single-user, runlevel 6 is reboot, and so on. The other files listed do not exist.

Q: Which boot loader can be used for File Allocation Table (FAT) filesystems and might be used for a rescue disk?
SYSBOOT
SYSLINUX
TIELINUX
FATLINUX
A: B. The SYSLINUX boot loader is used for FAT filesystems to create rescue disks and to assist with installation of Linux in general. SYSLINUX also describes an overall project containing other specialty boot loaders. The other options listed for this question are not valid boot loaders, though.

Q: Which of the following is used to provide an early filesystem-based loading process for key drivers needed to continue the boot process?
bootrd
driverload
initrd
initdrv
A: C. initrd is used for an initial root filesystem for early drivers. initrd is configured to load within the GRUB configuration file for a given operating system.

Q: When booting a system you receive an error similar to "No init found" and are then placed at an initramfs prompt. You need to check the hard drive for errors. Which of the following commands performs an error check on a hard drive partition in Linux?
defrag
fsck
checkfs
chkfs
A: B. The fsck command is used to diagnose and repair hard drive problems in Linux. The defrag command is not available in Linux.

Q: Which of the following commands places the system in single-user mode?
tellinit 1
chginit 1
telinet 1
telinit 1
A: D. The telinit command can be used for this purpose, and passing 1 as the argument will switch the system into single-user mode. The other commands shown are not valid.

Q: Which of the following commands changes the boot order for the next boot?
efibootmgr -c
efibootmgr -b -B
efibootmgr -o
efibootmgr -n
A: D. The -n option changes the boot order for the next boot only and boots from the specified partition. The -b along with -B modifies and then deletes the option. The -o option sets the boot order. The -c option creates a boot number.

Q: Which boot loader can be used with ISO9660 CD-ROMS?
ISOLINUX
EFIBOOT
ISOFS
BOOTISO
A: A. ISOLINUX provides a means by which CD-ROMS formatted as ISO 9660 can be booted. It’s very common to have live CDs or rescue/recovery CDs that use ISOLINUX for boot. The other boot loaders are not valid for this purpose or don’t exist.

Q: Within which directory are systemd user unit files placed by installed packages?
/usr/lib/systemd/user
/usr/lib/systemd/system
/usr/systemd
/usr/system
A: A. The /usr/lib/systemd hierarchy contains files related to systemd configuration. The user directory within the hierarchy is used for user unit files, and the system files are stored in /usr/lib/systemd/system.

Q: When using Unified Extensible Firmware Interface (UEFI), which of the following files can be used as a boot loader?
shim.uefi
shim.efi
shim.fx
efi.shim
A: B. Due to the decidedly insecure decisions made with the design of Microsoft’s UEFI, a shim is often needed to enable Linux to boot on a system with UEFI. The shim.efi file can be used as an initial boot loader for this purpose.

Q: Which directory on a SysV init-based system contains scripts that are used for starting and stopping services?
/etc/rc.int
/etc/boot
/etc/bootscripts
/etc/init.d
A: D. Scripts for starting and stopping services are located in /etc/init.d on a SysV init-based system. The other directories listed within this question are not valid.

Q: Which of the following commands is used to find overriding configuration files on a systemd-based system?
diff
systemctl -diff
systemd-delta
systemctl configoverride
A: C. The systemd-delta command is used to determine overridden configuration files. Of the other commands, diff is valid but not for this purpose. The systemctl command is also valid, but again, not for the purpose described.

Q: Which of the following commands on a Red Hat system lists all of the SysV services set to be executed on boot along with their setting for each runlevel?
rlevel
chkconfig --list
bootldr --list
init --bootlist
A: B. The chkconfig --list command displays all services that will be executed on boot along with the setting for each service for each runlevel. Of the other commands, the init command is valid but does not have a --bootlist option. The other commands are invalid.

Q: Which of the following commands, executed from within the UEFI shell, controls the boot configuration?
bootcfg
bcfg
grub-install
grcfg
A: B. The bcfg command within the UEFI shell is used to configure boot loaders on a UEFI-based system. The command can accept various parameters to configure how the boot loader and kernel will load on boot. Of the other commands shown, grub-install is valid but not within the UEFI shell.

Q: Which file must exist within /tftpboot on the Trivial File Transfer Protocol (TFTP) server for a system that will use PXELINUX for its boot loader?
pxelinux.tftp
pxelinux.boot
pxelinux.conf
pxelinux.0
A: D. The pxelinux.0 file must exist within /tftpboot on the TFTP server in order for a system to use PXELINUX for booting. The other files are not valid or necessary for PXELINUX.

Q: Which utility can you use on a Debian or Ubuntu system to manage SysV init scripts, such as setting them to run on boot?
bootorder
bootloader
configchk
update-rc.d
A: D. The update-rc.d utility can be used to manage SysV init scripts on Debian or Ubuntu and other distributions. When using update-rc.d, you supply the script name and the utility will take care of creating symlinks to the appropriate runlevels.

Q: Which key, pressed during the operating system selection menu, is used to enable editing of the parameters related to boot with GRUB?
v
e
r
y
A: B. The e key, when pressed at the right time during boot, will send you into the GRUB shell, where you can change parameters related to boot, such as the kernel options and other related parameters.

Q: Which systemctl subcommand is used to switch runlevels?
switch
move
runlevel
isolate
A: D. The isolate subcommand followed by the desired target is used to switch between runlevels with a systemd-based system. The other subcommands shown are not valid for systemctl.

Q: When examining the /etc/inittab file, which option signifies the default runlevel to which the system will boot?
default
defaultboot
initdefault
defaultlvl
A: C. The runlevel defined as initdefault is the default runlevel for the system. The other options shown do not exist.

Q: Which of the following is used instead of initrd to provide an early filesystem for essential drivers?
initnext
initramfs
initialize
initfs
A: B. The initramfs system is used instead of initrd to create the filesystem-based loading process for key drivers that are needed for boot.

Q: Which of the following commands sets the default systemd target to multi-user?
systemctl set-default multi-user.target
systemd set-default multi-user.target
systemctl set-def muser.target
systemd set-def muser.target
A: A. The systemctl command will be used for this purpose, and the set-default subcommand is necessary to affect the desired behavior. The target file is simply called multi-user.target.

Q: When using a shim for booting a UEFI-based system, which of the following files is loaded after shim.efi?
grubx64.cfg
grub.conf
grubx64.efi
efi.boot
A: C. The shim.efi boot loader loads another boot loader, which is grubx64.efi by default. The other options are not valid filenames for the purpose described.

Q: Within which hierarchy are files from /etc/init.d linked so that the files are executed during the various runlevels of a SysV system?
/etc/rc.S
/etc/rc
/etc/boot/rc
/etc/rc.d
A: D. The /etc/rc.d hierarchy contains symbolic links to files found within /etc/init.d. These symlinks are then used for executing the scripts at the appropriate runlevel. For example, on boot the system will execute the scripts found in the runlevel directory for each runlevel executed at boot time.

Q: What is the name of the unit to which a systemd system is booted in order to start other levels?
default.target
init.target
initial.target
load.target
A: A. The default.target is the default target unit that is activated by systemd on boot. The default target then starts other services based on the dependencies.

Q: When viewing information in /dev/disk/by-path using the command ls -l, which of the following filenames represents a logical unit number (LUN) from Fibre Channel?
/dev/fc0
pci-0000:1a:00.0-fc-0x500601653ee0025f:0x0000000000000000
pci-0000:1a:00.0-scsi-0x500601653ee0025f:0x0000000000000000
/dev/fibre0
A: B. LUNs that contain the characters fc are found through Fibre Channel. Therein lies the difference between options B and C, where option C contains the letters scsi, which would usually represent a local disk. The other options are not valid.

Q: You have purchased new solid-state drive (SSD) hardware that uses the NVMe (Non-Volatile Memory Express) protocol but cannot find the disks in the normal /dev/sd* location in which you have traditionally found such storage. In which location should you look for these drives?
/dev/nd*
/dev/nvme*
/dev/nv*
/dev/nvme/*
A: B. NVMe-capable drives are named /dev/nvme*. No special drivers are needed other than those found in the native kernel on a modern system. The other options do not exist as paths by default.

Q: Which file contains information about the current md Redundant Array of Inexpensive Disks (RAID) configuration such as the personalities?
/proc/raidinfo
/proc/rhyinfo
/proc/mdraid
/proc/mdstat
A: D. The /proc/mdstat file contains information on RAID arrays, including RAID personalities found on the system, the devices that comprise the array, and other pertinent information. The other files shown are not valid.

Q: Which of the following directory hierarchies contains information such as the World Wide Name (WWN) for Fibre Channel?
/sys/class/wwn
/sys/class/fc_host
/sys/class/fclist
/sys/class/fc/wwn
A: B. The /sys/class/fc_host directory contains other directories based on the Fibre Channel connections available. Within those host directories will be found the WWN in a file called port_name. The other directory hierarchies are not valid.

Q: Information about logical volumes can be found in which of the following directories?
/dev/lvinfo
/dev/map
/dev/mapper
/dev/lvmap
A: C. The /dev/mapper directory contains information about multipath devices such as logical volumes. The other directories are not valid.

Q: Which of the following commands will examine the PCI subsystem for NVMe-based devices?
psnvme
lsnvme
lspci | grep scsi
lspci | grep -i nvme
A: C. The lspci command will be used for this purpose. NVMe devices are listed with the name nVME or NVMe; therefore, adding -i to grep will make the search case insensitive. You’d use this in order to ensure that the devices are detected. The other commands are not valid, with the exception of the lspci command, but you cannot grep for scsi in this scenario.

Q: Which of the following devices is the location of the first Small Computer System Interface (SCSI) tape device detected at boot?
/dev/st1
/dev/sd0
/dev/sd1
/dev/st0
A: D. Tape devices are found within /dev/st*, making st0 the first device.

Q: Which of the following files should be used to display a message to users prior to logging in locally?
/etc/loginmesg
/etc/logmessage.txt
/etc/issue
/etc/banner
A: C. The /etc/issue file is used to provide a message to users, such as a login banner, prior to local login. The other files shown are not valid for the purpose described.

Q: Which file contains a message that is displayed after a successful login?
/etc/loginbanner
/etc/issue
/etc/motd
/etc/message
A: C. The contents of the file motd, an abbreviation for Message of the Day, are displayed when a user logs in successfully. Among the other options, the contents of /etc/issue are displayed prior to local login. The other filenames are not valid for this purpose.

Q: Which of the following files can be used to provide a message to users logging in remotely with a protocol such as telnet?
/etc/telnet.msg
/etc/issue.net
/etc/login.msg
/etc/telnet.login
A: B. The /etc/issue.net file is used to provide a message for remote logins such as telnet. The other files listed are not valid for the purpose described.

Q: Which of the following commands turns off the computer, including removing power, if possible?
systemctl halt
systemctl reboot
systemctl stop
systemctl poweroff
A: D. The poweroff target of systemd, accessed using the systemctl command, is used for halting the system and then attempting to remove power on compatible systems. The halt target stops the system but does not attempt to remove power, whereas reboot simply restarts the system. There is no stop target.

Q: Which of the following shutdown commands reboots the system in 15 minutes?
shutdown -r +15
shutdown +15
shutdown -15
shutdown -r 00:15
A: A. The -r option is needed to specify reboot, and the format for counting time from now is prefaced with a plus sign (+), making option A correct. Of the other commands, specifying +15 without the -r option simply shuts down the computer in 15 minutes, and specifying the time as 00:15, as in option D, will shut down the computer at 12:15 a.m.

Q: When terminating a process on a SysV init-based system, which command can be used to stop the process?
service
sysv
syscl
servc
A: A. The service command is used to work with services, such as starting and stopping them. On newer systems, the systemctl command has replaced the service command.

Q: Which of the following commands show the boot messages captured by systemd?
journalctl -b
systemctl -b
journalctl -bm
journalctl -l
A: A. The journalctl command with the -b option displays boot messages.

Q: Which option to the shutdown command halts or stops the system?
-h
-s
-f
-t
A: A. The -h option halts the system, including shutting down acpid-related hardware.

Q: Which signal number is used as SIGKILL when used with the kill command?
1
4
9
11
A: C. The number 9 corresponds to SIGKILL and can be passed to the kill command to issue that signal. The number 1 is SIGHUP. Others can be found within the manual for the kill command.

Q: Which directory contains rc-related startup scripts on a legacy Debian system?
/etc/init
/etc/inittab
/etc/init.d
/etc/rc.init
A: C. The /etc/init.d directory contains the startup and shutdown scripts for services on a Debian system that is not running systemd.

Q: When attempting to enable an integrated peripheral on a basic input/output system (BIOS) system, what should be done to determine whether the peripheral has been enabled within the BIOS?
Examine boot messages to determine if the kernel has detected the peripheral.
Examine /var/log/auth.log for detection of the peripheral.
Reboot the system to determine if the device works.
Enable the peripheral by removing it from the blacklisted modules.
A: A. Among the options, examining the boot messages would be a first logical step and would prevent having to reboot the system. Rebooting may be a next step in order to examine the status of the peripheral within the BIOS.

Q: Which option to the wall command suppresses the "Broadcast message" banner that normally displays?
-b
-a
-n
-d
A: C. The -n option prevents the banner from displaying when using wall. The other options shown are not used with the wall command.