189 KiB
189 KiB
1 | 4 | The udevadm command is used to work with the udev interface of the kernel, and the monitor subcommand displays kernel uevents and other udev events in real time. |
---|---|---|
2 | 2 | Current IRQ assignments are contained in the file /proc/interrupts. Therefore, viewing the contents of the file with a command such as cat will work. There is no “view” command, making option A incorrect. Likewise, there is no /dev/irq file, making options C and D incorrect. |
3 | 4 | Configuration files for udev are found in /etc/udev, which makes option D correct. The other options do not exist. |
4 | 1 | The modprobe command loads the module and its dependencies, if applicable. The lsmod command is used to list currently loaded modules, making option B incorrect. The insmod command will load a given module but not its dependencies. Option D, rmmod, is used to remove a module from memory. |
5 | 2 | The lsusb command is used to obtain a basic list of USB devices on a system. The other commands are not valid. In the case of option D, the ls command is valid, but there is no --usb option. |
6 | 2 | The info command for udevadm enables querying for additional information about a hotplug device managed with udev. |
7 | 4 | The dmesg command displays the contents of the kernel ring buffer. On many Linux distributions, this log is also saved to /var/log/dmesg. The other options shown for this question are not valid commands. |
8 | 3 | Runlevel 1, sometimes displayed as runlevel s or S, is single-user mode in which many services are not started. Runlevels 5 and 6 are used for other purposes, and runlevel SU is not a valid option. |
9 | 4 | Scripts are stored in /etc/init.d on a system using SysV init. You may sometimes find these linked from /etc/rc.d/init.d as well. The other options are not valid for this question. |
10 | 1 | The init command can be used to access different runlevels. Runlevel 6 is used for rebooting the system. Option B will shut down the system entirely, not reboot it. Option C will place the system into single-user mode. Option D is not a valid option. |
11 | 3 | The telinit command can be used to refresh the system after changes have been made to /etc/inittab. Notably, option B will reboot the system but that was not an option in the question. Options A and D are not valid commands. |
12 | 4 | The runlevel command displays the current runlevel for a system. Option B is not a valid option to the init command, and adding sudo in front of the init command makes no difference. Option A is not a valid command. |
13 | 3 | Unit configuration files are stored in /lib/systemd/system. The other directory options for this question are not relevant or do not exist by default. |
14 | 3 | The -nn option displays both numbers and device names, making option C correct. The -n option (option B) displays only numbers. The other two options do not exist. |
15 | 4 | The lsmod command is used to list currently loaded kernel modules, making option D correct for this question. The insmod command (option A) is used to load modules. Option C is a valid command but not a valid option for that command, and option B does not exist. |
16 | 3 | The --show-depends option shows the modules that depend on the specified module. The other options do not exist. |
17 | 2 | The wall command is used to send a message to all users, thereby making option B correct. The cat command is used as a means to concatenate or view files, and tee is used to send output to standard output and a file. Finally, ssh is the secure shell client command and is not used for the purpose specified. |
18 | 2 | Checking to ensure that the disk is detected in the basic input/output system (BIOS) is a good first step in troubleshooting. Option A, unplugging the disk, won’t help it to be detected. Restarting the web server won’t help detect the disk, and the disk-detect command does not exist. |
19 | 4 | The /sys/bus/usb/devices directory contains information about USB devices. The other directories are not valid for this purpose. |
20 | 4 | The file /var/log/dmesg will typically contain historical messages from the current booting of the system. On some distributions of Linux, this information is also in /var/log/boot.log. |
21 | 3 | Out of the options given, the systemctl status command and option is the most appropriate. The telinit and sysctl commands are not used for this purpose. Likewise, the --ls option is not valid for systemctl. |
22 | 2 | The isolate option is used to move the system into the target specified, making option B the correct one. The other options do not exist. |
23 | 1 | The initctl reload command causes Upstart to reread its configuration files. |
24 | 2 | The --list option will show all services on a system along with their status for each runlevel. |
25 | 3 | USB devices are generally considered to be hotplug devices. Hotplug devices describe those devices that can be inserted and removed while the system is “hot,” or powered on, whereas coldplug devices are those that must be inserted and removed when the system is powered off. |
26 | 2 | The umount command is used to unmount drives within a running system. The other commands do not exist. |
27 | 4 | Of the options presented, running dmesg is a common way to determine the location to which the kernel has assigned the drive. Rebooting the system is not a good option, though it would work. There is no such thing as /var/log/usb.log, and the location of the drive may change regardless of port, depending on how the drive may be detected in the system. |
28 | 2 | From these options, only B will shut down the system immediately. Option A will cancel a shutdown. |
29 | 3 | The ExecStart option indicates the command to be executed on startup of a systemd service. |
30 | 4 | The systemctl get-default command will show the default target. The other commands and options are not valid. |
31 | 1 | 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. |
32 | 3 | The /proc filesystem contains information about currently running processes and additional information about the kernel and current boot of the system. |
33 | 3 | 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. |
34 | 4 | 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. |
35 | 3 | 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. |
36 | 2 | The tune2fs command can be used for this purpose but should be used with care because it can result in data corruption. |
37 | 3 | 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. |
38 | 2 | 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. |
39 | 2 | 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. |
40 | 2 | 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. |
41 | 4 | 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. |
42 | 1 | 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. |
43 | 2 | The /proc/sys/kernel hierarchy contains vital configuration information about a kernel. These settings can be changed on a running system. |
44 | 2 | The /etc/systemd/system directory is where it is recommended to store unit files for systemd. The other locations are not valid. |
45 | 3 | 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. |
46 | 2 | 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. |
47 | 2 | 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. |
48 | 3 | 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. |
49 | 2 | The fsck command is used to diagnose and repair hard drive problems in Linux. The defrag command is not available in Linux. |
50 | 4 | 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. |
51 | 4 | 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. |
52 | 1 | 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. |
53 | 1 | 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. |
54 | 4 | 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. |
55 | 3 | 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. |
56 | 2 | 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. |
57 | 2 | 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. |
58 | 4 | 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. |
59 | 4 | 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. |
60 | 2 | 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. |
61 | 4 | 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. |
62 | 3 | The runlevel defined as initdefault is the default runlevel for the system. The other options shown do not exist. |
63 | 2 | The initramfs system is used instead of initrd to create the filesystem-based loading process for key drivers that are needed for boot. |
64 | 1 | 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. |
65 | 3 | 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. |
66 | 4 | 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. |
67 | 1 | 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. |
68 | 2 | 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. |
69 | 2 | 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. |
70 | 4 | 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. |
71 | 2 | 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. |
72 | 3 | The /dev/mapper directory contains information about multipath devices such as logical volumes. The other directories are not valid. |
73 | 3 | 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. |
74 | 4 | Tape devices are found within /dev/st*, making st0 the first device. |
75 | 3 | 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. |
76 | 3 | 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. |
77 | 2 | 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. |
78 | 4 | 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. |
79 | 1 | 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. |
80 | 1 | 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. |
81 | 1 | The journalctl command with the -b option displays boot messages. |
82 | 1 | The -h option halts the system, including shutting down acpid-related hardware. |
83 | 3 | 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. |
84 | 3 | The /etc/init.d directory contains the startup and shutdown scripts for services on a Debian system that is not running systemd. |
85 | 1 | 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. |
86 | 3 | The -n option prevents the banner from displaying when using wall. The other options shown are not used with the wall command. |
87 | 3 | SATA disks are addressed as /dev/sdX, just like a Small Computer System Interface (SCSI ) disk. /dev/hdX is a traditional ATA disk. The other options do not exist. |
88 | 3 | The keyword single, given on the Linux kernel command line, will boot the system into single-user mode. The other options are not valid. |
89 | 1 | The Shift key, if pressed when control has first been handed to GRUB, will cause the GRUB menu to be displayed. |
90 | 2 | The root=/dev/sda2 option will cause the given kernel to load /dev/sda2 for its root partition. The rootpartition option is not valid, and the format of the root={hd0,3} is not valid in this context. |
91 | 3 | You begin an editing session with an e when the boot option is highlighted. You can then make changes and, when done, press b to boot the system. |
92 | 4 | The root partition is mounted after device initialization. System services, including multi-user mode, start after the root partition is mounted. The other two options, A and C, take place prior to the kernel-initializing device drivers. This process is essentially the same for virtual machines as it is for physical machines. |
93 | 4 | The ESP is typically mounted at /boot/efi. |
94 | 4 | The partition containing /var should be the largest for a mail server because mail spools are stored within this hierarchy. The /etc/ hierarchy is usually small, as is /usr/ bin. The /mail directory does not exist by default. |
95 | 3 | The rootnoverify option is used to specify a non-Linux kernel, one that GRUB should not attempt to load. The initrd option is used for specifying the initial RAM disk, making option A incorrect. The remaining options, B and D, are not valid options for GRUB. |
96 | 1 | The update-grub command sends its output to STDOUT. Therefore, you must redirect using > and send that output to the correct file. The other options are not valid for this purpose. Options C and D are not valid commands, and option B contains invalid options as well as an invalid location for the destination file. |
97 | 2 | MBR-based disks can be partitioned with up to four primary partitions, one of which can be further partitioned or extended into logical partitions. |
98 | 4 | The ldconfig command updates the current shared library cache and list. ldconfig reads /etc/ld.so.conf and incorporates any changes found within it. The other commands listed as options for this question do not exist. |
99 | 2 | The upgrade option for apt-get will upgrade the system to the latest version of software for packages already installed. The apt-update command does not exist, nor does the -U option to dpkg. The apt-cache command is used to work with the package cache. |
100 | 3 | The yum install command will install a given package. The update option will update a package. The other options listed do not exist. |
101 | 3 | Root’s home directory is /root on a Linux system. While the /home directory does exist, there is no root or su user within that hierarchy by default. The / directory is the root of the filesystem but not the root’s home directory. |
102 | 1 | rpm2cpio sends its output to STDOUT by default, and therefore that output needs to be redirected to a file in most cases. |
103 | 2 | The /usr hierarchy contains many of the programs that run on a Linux system. Other notable directories for programs are /bin and /sbin. |
104 | 2 | GRUB begins its count at 0 and in this scenario there are two operating systems. Therefore, because Linux is first in the configuration file its number would be 0, which is then sent to the default= option. |
105 | 1 | The /etc/default/grub file can be used for this purpose. You may also edit /boot/grub/grub.cfg, but this was not an option given for this question. |
106 | 2 | The deplist option displays the dependencies for the given package. The list option displays information about a specific package while the other two options are not valid. |
107 | 1 | The -ivh options will install a file using rpm, displaying both verbose output and hash marks for progress. The other options presented do not exist or do not accomplish the specified task. |
108 | 2 | The export command is used to set environment variables in BASH. The other commands are not valid for this purpose. |
109 | 4 | The yumdownloader utility will download an RPM package but not install it. The yumdownloader utility is part of the yum-utils package. The other options listed for this question do not exist. |
110 | 1 | The apt-cache command is used to work with the package cache and the search option is used to search the cache for the supplied argument, in this case zsh. The apt-get command is used to work with packages themselves, and the apt search command does not exist. |
111 | 3 | The GRUB_DEFAULT option, when in the /etc/default/grub file, is used to configure the operating system that will boot by default. The other options do not exist in this context. |
112 | 1 | The ro option, which is the default for GRUB, will initially mount the root partition as read-only and then remount as read-write. |
113 | 4 | Configuration files related to the repositories for yum are located in /etc/yum.repos.d. Of the other options, /etc/yum.conf is a file and not a directory, and the other directories do not exist. |
114 | 1 | The -V or --verify option will check the files in a given package against versions (or checksums) in the package database. If no files have been altered, then no output is produced. Note that output may be produced for files that are changed during installation or for other reasons. Note also the use of an uppercase V for this option as opposed to the lowercase v for verbose. |
115 | 3 | The -o option can be used to specify a destination file to which output will be sent instead of STDOUT. The other options listed in this question do not exist. |
116 | 1 | The menu.lst and grub.conf files are used in GRUB Legacy, that is, prior to GRUB 2. This therefore makes option B incorrect. |
117 | 4 | The ldd command will list the libraries on which the command’s argument depends. |
118 | 2 | Swap space is used when there is insufficient RAM memory on a system. |
119 | 2 | The /etc/lib directory is not typically associated with library files and does not usually exist on a Linux system unless manually created. The other options either contain system libraries or can be used for that purpose. |
120 | 3 | The apt-get update command will cause the package cache to be updated by retrieving the latest package list from the package sources. There is no cache-update or update option to apt-cache. The upgrade option is used to update the system’s packages and not the cache. |
121 | 3 | The sources.list file located in /etc/apt contains the list of repositories for Debian packages. The other file locations do not exist by default. |
122 | 1 | The /boot partition will typically be much less than 500MB but should not be undersized. The used space within /boot will increase as more kernels are added, such as during an upgrade process. Therefore, even though the recommended size is up to 500MB, experience proves that a larger partition is helpful, possibly 1GB to 2GB. |
123 | 2 | The pvcreate command initializes a physical partition for future use as a logical volume with LVM. |
124 | 4 | The grub-install command is used to install GRUB onto a disk and the second SATA disk would be /dev/sdb, making option D correct. |
125 | 1 | The dpkg-reconfigure program will cause an already installed package to be reconfigured or changed. The -r option for dpkg removes a package, making option B incorrect. There is no reconf option for dpkg or reinstall option for apt-get. |
126 | 3 | The lvcreate command is used to create logical volumes with LVM. The pvcreate command initializes physical volumes prior to creating logical volumes. The commands in the other two options for this question do not exist. |
127 | 1 | Physical volumes are initialized first, followed by volume group creation, and then logical volume creation. |
128 | 4 | aptitude provides the terminal-based interface rather than the standard command-line interface of the other tools listed in this question. |
129 | 4 | The search option performs a search of various fields such as the package name and description. |
130 | 2 | The rpm -qa kernel command will show the kernel version. You can also use uname -r for the same purpose. |
131 | 3 | The GRUB_DEFAULT option in /etc/default/grub will set the operating system to boot by default. |
132 | 1 | The exclude option can be used to exclude certain packages. The argument accepts wildcards, and therefore excluding all kernel* updates will create the desired behavior. |
133 | 2 | The grub-mkconfig command should be run after making a change to the /etc/default/grub file so that a new configuration file can be created with the changed option(s). |
134 | 2 | The -s option to dpkg searches for the given package and provides information about its current status on the system. The apt-cache command is not used for this purpose, and the -i option for dpkg installs a package. The apt-info command does not exist. |
135 | 3 | The lvmdiskscan command looks for physical volumes that have been initialized for use with LVM. |
136 | 2 | The --resolve option will download the dependencies of the package being downloaded. The other options shown within this question are not valid for the yumdownloader command. |
137 | 1 | The -i option to dpkg will install a previously downloaded package. The other commands don’t exist, and the -U option for dpkg does not exist. |
138 | 4 | GRUB Legacy begins counting at 0 and separates disk letter and partition with a comma, making 0,0 the first partition on the first disk. Options A and C are not the first disk on the system, and option B contains a nonexistent partition. |
139 | 1 | ESP uses the legacy FAT filesystem type for its underlying format. There is a specification for how the ESP partition must be created on top of the FAT format for boot loaders and kernel images. Note that the partition is typically FAT32 but can be FAT16 if only Linux systems will reside on the drive. |
140 | 1 | The --install option is used followed by the partition to which extlinux will be installed for boot. |
141 | 3 | The format for the mount command is [partition] [target], making option C correct. The other options are not valid because the arguments are in the wrong order. |
142 | 2 | The master boot record (MBR) is the first sector on a disk and contains information about the structure of the disk. If the MBR becomes corrupt, all data on the disk may be lost. The other options shown for this question are not valid. |
143 | 4 | The --boot-directory option enables you to specify an alternative location for GRUB images rather than the default /boot. The other options shown for this question are not valid. |
144 | 4 | The /etc/mtab file lists the currently mounted filesystems. The /etc/fstab file lists overall filesystems for the computer but does not distinguish between mounted or unmounted filesystems. The other options listed for this question do not exist. |
145 | 2 | The swapon command enables swap space, making it available for use as virtual memory. The mkswap command formats the space. The other two commands are not valid. |
146 | 3 | The pvdisplay command shows information about a given physical volume. You can use pvdisplay to view the device on which the PV is built along with the extent size of the PV. The other commands shown are not valid. |
147 | 2 | The lvcreate command is used to create a logical volume from previously created physical devices and volume groups. Using lvcreate is the final of three steps in the process for using LVM prior to actually using the logical volume. |
148 | 1 | The vgscan command looks for both physical volumes and volume groups related to an LVM configuration. The vgscan command is run at system startup but can also be run manually. The other commands are not valid. |
149 | 3 | The pvscan command displays a list of physical volumes on a given server. The PVs displayed are those that have been initialized with pvcreate for use with LVM. |
150 | 1 | The -a or --activate option sets whether or not the logical volume can be used. There is no -b or -c option, and the -d option is used for debugging. |
151 | 3 | The script is using a relative path to look for srv/vhosts rather than /srv/vhosts with an absolute path back to the root directory of the system. |
152 | 2 | Application containers share kernel and other resources with the underlying OS and use a container daemon to communicate between the host OS and the application container. Virtual machines have their own kernel and are self-contained machines running on top of a host OS or host kernel. Linux containers also provide a containerized virtual machine– like experience but are distinct from application containers. |
153 | 4 | The /etc/ld.so.conf directory is used in addition to /lib and /usr/lib to configure library locations. The other paths and files shown do not exist. |
154 | 1 | Among these options, compute resources, such as adding more CPUs, would be the most likely option. Adding RAM might also be warranted, but that was not one of the available options for this question. There is no indication in the question that the network is slow, and there is no indication that adding disk space or block storage (which are essentially the same thing in this context) will help. |
155 | 1 | GRUB 2 uses grub.cfg whereas GRUB uses menu.lst and grub.conf, making option A the correct choice. |
156 | 2 | The MAC address will be unique for each virtual machine deployed using the image. Guest drivers would usually not be unique to an individual virtual machine but might be unique on a per-template or per-image basis. System directories are not unique per virtual machine, and there is no such thing as pilot homing in this context. |
157 | 2 | The cloud-init program is available on Ubuntu and other distributions and can be used to deploy images to popular cloud providers. |
158 | 3 | The yum package manager configuration file is /etc/yum.conf. The other files listed do not exist. |
159 | 2 | The -L option to dpkg lists the files included with a given package. The -f option to dpkg shows a field from a package entry, and the other options do not exist. |
160 | 1 | The public key is deployed to the authorized_keys file on each image, and the private key is used from the host to connect to each virtual machine. There is no reason to deploy the private key to the virtual machine in order to make a connection to it. |
161 | 1 | The /boot/efi partition needs to exist for the EFI partition and is typically sized 100MB to 250MB, though that size can vary. |
162 | 1 | The install option, or simply in, will install a package on a system that uses zypper for package management. Among the other options listed, the ref option refreshes the repository. The other options are not valid with zypper. |
163 | 4 | A system running Fedora 22 will use the dnf package manager by default. The yum package manager is used on CentOS and Red Hat, and apt and dpkg are used on Debian. |
164 | 1 | The repoquery command with the -l option is used for this purpose. The dpkg -L command is appropriate for this purpose on Debian systems. The other commands do not exist. |
165 | 3 | Home directories for normal users are in /home and the home directory for root is at /root, making option C correct. |
166 | 1 | The /etc/machine-id file contains the unique identifier for a given machine. |
167 | 1 | The -n option tells ldconfig to process only the directories given on the command line. The -i option ignores the auxiliary cache file. The -v option is verbose, and -r changes the root directory from which to begin processing. |
168 | 3 | The stats option shows total package names along with other information about the package cache. The other options are not valid for use with apt-cache. |
169 | 4 | The --efi-directory option is used to specify the location of the EFI partition, typically /boot/efi. |
170 | 1 | The /etc/fstab file contains a list of partitions for the system. The /etc/mtab file contains currently mounted partitions. The other files do not exist. |
171 | 2 | The options qlp list the files in an rpm package. The other options are not valid for the purpose described in the question. |
172 | 2 | Among the commands and options shown, the info option to yum is used for this purpose. The dpkg and apt package managers are used on Debian systems and thus would not be appropriate for a CentOS system. |
173 | 1 | The presence of the string vmx in the flags section indicates that an Intel processor is capable of virtualization. This extension is called svm on an AMD architecture. |
174 | 1 | The lvm.conf file is a primary configuration file for LVM. Within lvm.conf, typically found in /etc/ or /etc/lvm/, you can set things like filters for devices to include or exclude from the vgscan process. The other files shown are not valid. |
175 | 3 | The --show option displays information about the swap spaces on the computer, including how much swap is currently being used. The -a option activates all swap spaces. There is no --list option, and -h displays help. |
176 | 4 | The set command can be used for a variety of purposes to change how the shell environment works. One such option is –C, which prevents output redirection such as that done with > from overwriting a file if the file already exists. |
177 | 2 | The env command will print the current environment variables from Bash. The printenv command will perform the same operation. The other commands listed in this question do not exist. |
178 | 3 | The man command displays documentation for the command given as the argument. The other options listed for this question do not exist. |
179 | 4 | The uname command is used to print system information, and the -a option prints all information available to uname. |
180 | 1 | The g option, also known as global or greedy, will apply the matched operation to the entire line rather than just the first instance of the match. The other options apply as they would for a Perl-Compatible Regular Expression. Note also the tr command that provides some of the same functionality as sed. |
181 | 3 | The -l option provides the number of lines given as input. For example, wc -l /etc/ passwd would print the number of lines in the /etc/passwd file. The other options given in this question are not valid for the wc command. |
182 | 3 | Both head and tail print 10 lines of output by default. |
183 | 2 | The -rf options to rm will recursively remove the contents of a directory, including other directories. The -f option alone will not work in this case because of the additional directories. The other options given for rmdir do not exist. |
184 | 4 | The -type option causes find to limit its search to directories only, whereas the -name option limits the names of returned elements. Note the use of the wildcard due to the phrasing of the question. Also note the use of ./ to denote beginning the search in the current directory. |
185 | 1 | The cat command will display the contents of file /etc/passwd and then pipe that output to the awk command. The awk command then parses its input, splitting along the specified separator for /etc/passwd, which is a colon (:). The output is then printed and piped to the sort command. The sort command in option B will not work because the cut command requires an argument. Likewise, the echo command in option C will only echo /etc/passwd to STDOUT. |
186 | 3 | The -l option for ls produces long or listed output and -t sorts by time stamp. The -r option reverses the order, and -a is needed to include hidden (dot) files, making option C correct. |
187 | 1 | The time stamp of the file will change when touch is run on a file that already exists. |
188 | 4 | The -i option will cause both cp and mv to be interactive, that is, prompt before overwriting. The -f option will force the command to run, whereas -r is recursive. |
189 | 3 | The tee command will send output both to STDOUT and to the specified file, making option C correct. Option A will redirect output to the correct file but not to STDOUT simultaneously. The other options will not work for this question. |
190 | 1 | The -p option will cause mkdir to create additional levels of directories without error. Running mkdir without options will not work in this case. The -r and -f options to mkdir do not exist. |
191 | 2 | The -R option will copy directories recursively. Note that if the -i option is not enabled, the recursive copy will overwrite files in the destination. The -v option adds verbosity but does not cause any recursion, and the -Z option does not exist. |
192 | 3 | The file command can be used to determine which type of file is being used. This can be particularly helpful for files without extensions where you are unsure if you should view the contents of the file. Option A, grep, is used to look within files but would not be helpful in this case. The telnet and export commands are not used for this purpose. |
193 | 3 | The dd command is used to create disk images, among other things. In this case, the input file is /dev/sda1 and the output file is output.img. It’s also common to add the blocksize option by using the bs argument, such as bs=1M. |
194 | 2 | The cut command uses Tab as its default delimiter. This can be changed with the -d option. |
195 | 1 | The -z option will unzip the file, -x will extract from the tar archive, and -f is used to indicate the file on which to perform the aforementioned operations. It’s typical to add -v for verbose output as well. |
196 | 4 | The fg command will bring a command to the foreground if it has been backgrounded with either & or with the bg command. |
197 | 2 | While the ps auwx command combined with grep will provide information on the running Apache instances, it will provide much more information than is required or useful for this problem. The pgrep command provides only the process IDs and therefore meets the criteria presented in the question. |
198 | 4 | The top command is used to continuously monitor things like CPU and memory usage, and the -p option monitors a single process. By using the runquotes with the pidof command, the process ID is provided as input to the -p option. |
199 | 4 | The free command displays overall memory usage for both RAM and swap and can be used to determine when additional memory might be needed. |
200 | 1 | You need to write the changes to the file; therefore you’ll need :w. The addition of q will also quit. Note that you could use ZZ to write and quit as well. The dd command deletes a line, and x deletes a single character. |
201 | 4 | The -n option changes the number of lines of output for both head and tail to the number specified. The other options listed in this question are not valid for head, and the -f option follows a file with tail as the file grows. |
202 | 1 | The uptime command shows basic information such as that described along with the number of users logged into the system and the current time. The bash command is a shell environment, and the ls command will not display the required information. |
203 | 4 | The screen command starts a new terminal that can be disconnected and reconnected as needed. Processes running from within the screen session do not know that they are running in a screen session and therefore meet the criteria needed to satisfy this question. The fg and bg commands will not meet the criteria, and the kill command will stop a process. |
204 | 3 | The -9 option invokes SIGKILL, which will force the process to end. The 15 signal is the default, and the -f and -stop options do not exist. |
205 | 3 | Within Bash, the number 1 represents STDOUT and 2 represents STDERR. Redirecting both means combining them in the manner shown in option C. |
206 | 2 | The nice command, when run without arguments, will output the priority for the currently logged-in user, which is normally 0. The renice command can be used to change the priority of running processes. The other two commands shown as options for this question do not exist. |
207 | 4 | Within a regular expression, * represents 0 or more characters. In this case, it doesn’t matter whether a person is using /bin/bash or /usr/bin/zsh. Likewise, a . matches a single character, but in the case of bash and zsh, we need to look at the first and then optionally a second character. The ? character makes the second . optional. Finally, the $ anchors the pattern at the end of the string and is also the key for this regular expression. |
208 | 1 | The different levels of the manual are accessed by preceding the argument with the desired level. The other options, such as --list, do not exist in this context. |
209 | 3 | The o command opens a new line below the current cursor location. The a command begins an insert mode session at the character after the cursor, not the line. The i command begins an insert mode session at the current cursor location. |
210 | 1 | Sending -HUP as part of the kill command will restart a process. Of the other options, a -9 will kill the process completely. The other two options do not exist as valid means to kill a process. |
211 | 2 | The history command will display your command history, including commands from the current session. You can specify how many lines of history to display, as shown in the answer for this question. Note that .bash_history will not show the current session’s history. |
212 | 3 | The jobs built-in command shows the list of jobs running in the background. Its output includes a job number and the status of the job. |
213 | 2 | The find command, beginning with the path and then the -name argument, will locate all of the files called .bash_history. The output from the find command should be piped to xargs, which can then build further commands from standard input. Note that this question and solution assumes that all users use the Bash shell and are keeping history. |
214 | 3 | The tail command provides the end portion of the file given as an argument. Adding the -f option will cause the output to update as new lines are added to the file being tailed. |
215 | 4 | The nl command will prepend line numbers onto the file given as its argument. The output is then sent to STDOUT. Of the other options, wc -l will print the number of lines in the file but not prepend those numbers onto each line, as was asked for in this question. |
216 | 1 | The xz command can compress and decompress files in a variety of formats, one of which is lzma. |
217 | 1 | The find command will be used for this purpose. Adding -type f will limit the search to only files and the -mtime option will limit to modification time in day format. |
218 | 3 | The mv command is used to move files, and *.txt will look for all files with a .txt extension. Note the fully qualified destination with a / preceding the name tmp. |
219 | 4 | The pwd command prints the current working directory. The cd command changes directory. |
220 | 1 | The file needs to first be sorted to group common ZIP codes together. After that, piping the output to uniq will display the unique ZIP codes, and the -c option provides a count. |
221 | 1 | Preceding the command with a ! will search history and execute the specified command. For example, !vi will start your last Vi session. |
222 | 3 | The killall command is used to terminate processes using their name. |
223 | 3 | The ? key will search backward in a file within Vi. The / is used for searching forward. The h key moves the cursor to the left one character, and the x key will delete a character. |
224 | 4 | The export command makes an environment variable available to subsequent child processes. The other commands shown are not valid. |
225 | 2 | The echo command sends output and $0 is the parameter that contains the current script name. Of the other options, $PS1 is the shell prompt and the other two options do not exist by default. |
226 | 2 | The gunzip command is typically used for decompressing files with a .gz extension. The other options are not valid commands. |
227 | 3 | The -i option causes rm to use interactive mode, where the command will prompt for confirmation prior to taking action. See the (1) rm man page for additional information on the other options. |
228 | 1 | The find command can be used for this purpose. When used with the size option, various size-related options can be used. The option +1G searches for files greater than or equal to 1GB. |
229 | 2 | The -v or verbose option lists files as cpio is working with them. Of the other options, -s is swap bytes and –l is used to link files. The -k option is included for compatibility purposes. |
230 | 2 | The bzcat command sends output to STDOUT from a bzip2 archive. |
231 | 3 | The jobs command is actually a shell built-in command, meaning that more information is available by using the man page for bash itself. The other options either are not valid or will not show information about the jobs command/built-in. |
232 | 2 | The nohup command can preface another command when starting so that the process or command will not accept a SIGHUP. |
233 | 4 | The watch command runs a command repeatedly and displays the output and errors from the command. The pgrep command does not fulfill the needs of this scenario. The mon and procmon commands are not real. |
234 | 2 | The tmux command creates two (or more) sessions within the same physical terminal window and thus enables this scenario. The screen command can be used to create an additional session, but the screen command does not meet the criteria specified in this scenario, because the scrollback buffer does not capture enough lines by default. The other commands shown are not valid. |
235 | 1 | The pkill command can be used for the scenario described. The other options are not valid commands. |
236 | 1 | The -f option matches against the full path. The -d option is used to set the delimiter, the -o option matches the oldest process, and the -i option sets the search to be case insensitive. |
237 | 2 | The which command is used to determine the command that will be run based on the current environment settings such as the path. The find and ls commands will not work for this purpose. |
238 | 2 | The unset shell built-in is used for the purpose described. Both the reset and clear commands do not accomplish the task described, and there is no undo command. |
239 | 1 | The type shell built-in displays information about a given executable. For example, the command type alias shows that alias is a shell built-in as well. |
240 | 3 | Double quotes help to ensure that variables are interpolated within a shell script. Runquotes are not used for this purpose, and the other options are not valid types of quotes. |
241 | 3 | The less pager fits the scenario described. The more pager does not have as much flexibility as less. The other options shown are not valid. |
242 | 3 | The od command converts a file to octal format. The other options shown all have invalid commands. |
243 | 2 | The -b option for sha256sum and sha512sum reads the file in binary mode as opposed to text mode, which is the default. |
244 | 2 | The h, j, k, and l keys enable movement of the cursor in command mode Vi. |
245 | 3 | The decompress and stdout options to xz are functionally equivalent to the xzcat program. There is also a related program called zcat for outputting files compressed with gzip to STDOUT. |
246 | 1 | The EDITOR environment variable controls the editor that is used. Typical choices include nano, Emacs, Vi or enhanced Vi, known as Vim. |
247 | 4 | The seventh manual section for regex is found by specifying the level after the command and prior to the manual page to examine. |
248 | 2 | The renice command changes the priority of a running process. The nice command is not capable of altering running processes, and the other commands shown are not valid. |
249 | 2 | The fgrep command is equivalent to running the grep command with an -F option. The -f option specifies a file, and the -E option utilizes an extended regular expression and is equivalent to the egrep command. The -a option is important in its own right and causes grep to process a binary file as if it were a text file. |
250 | 1 | All of the options shown use regular expressions. In the correct answer, the strings Steve and steve will match due to the use of a character class. Option B would match only Steve but, due to the quantifier *, would also match strings like Siwejfiwjfheteve. Option C uses anchoring and thus would only match Steve or steve at the beginning of a line. Option D also uses an anchor to indicate end of line and thus does not make sense in this context. |
251 | 3 | The top command shows running processes, typically sorted by CPU usage and updates every few seconds. The ps command shows processes but does not auto-update. The nice command sets priority, and there is no procs command. |
252 | 1 | Files compressed with the gzip utility can typically be read by other operating systems, though it may require additional software for certain operating systems. Compression utilities like bzip2 and xz almost certainly require additional software. The tar command in option D is not a compression utility. |
253 | 1 | The question mark can be used as a wildcard for such a scenario. An asterisk would also work for file globbing. |
254 | 2 | The split command can break up a file into multiple pieces. The cut command would split an individual line but does not meet the criteria in this scenario. There is no dice or rem command. |
255 | 3 | The scheduling priority of the process is shown in the PR column. The process ID is displayed in the PID column. The top command shows CPU utilization in the %CPU column and does not display information about the processor cores. |
256 | 1 | The d key will be used for this and the number 7 used in order to cut or remove eight lines. Other keys to work with text for cut, copy, and paste in Vi include p, y, dd, and yy. The other options shown for this question are not valid. |
257 | 1 | The unxz command decompress a file that has been compressed with xz. |
258 | 4 | The md5sum command creates a 128-bit MD5 message digest. The sha256sum command produces 256-bit values, whereas sha512sum produces 512-bit values. |
259 | 1 | The paste command fits the scenario described and separates the lines from each file by a tab. The other commands are not valid. |
260 | 1 | Using a fully qualified path meets the scenario in the most typical manner. You could add the command path to the PATH environment variable, but that is unnecessary given the scenario. Restarting the shell or computer would not have any effect. |
261 | 2 | The SIGTERM signal is used by default by the pkill command. This can be changed using the --signal option. |
262 | 4 | Running jobs are listed with the -r option. The -s option displays only stopped jobs, whereas -l shows process IDs. There is no -a option to the jobs built-in command. |
263 | 3 | The -c option outputs to STDOUT. See the bzip2(1) man page for additional details. |
264 | 1 | The listing shows a symbolic linked file located in the current directory, linked to .configs/fetchmail/.fetchmailrc. The file is owned by the root user and root group and was created on July 8, 2014. |
265 | 1 | The mount command is used to mount drives in Linux. The source and destination mount points are expected as arguments. Drive partitions begin at the number 1, making the first partition number 1. |
266 | 3 | The noexec option will prevent programs from being executed that reside on the partition. The noexec option is used frequently for mounting the /tmp partition. |
267 | 2 | 0x82 is Linux swap, and 0x83 is Linux. NTFS is 0x07, and FAT is 0.0c. |
268 | 2 | The partition type 0x83 should be created for a normal Linux partition. Type 82 is used for swap; 84 is an OS/2 partition. There is no L type. |
269 | 1 | The which command returns the full path to the given command and is useful for determining both whether a given command is available and the location from which the command will run. |
270 | 1 | The chgrp command can be used to change group ownership of a file. The order is chgrp <groupname> <target>. |
271 | 3 | The file is almost certainly a hard link to the original script. Although ls won’t show this information, the stat command will show that it is a link and also show the inode to which the file is linked. |
272 | 1 | The -i option to df produces information on inodes across all filesystems. The ls -i option will produce inode listings, but only for the current directory. The -i option is invalid for du, and dm does not exist as a command. |
273 | 3 | The -y option will attempt to repair automatically, essentially answering y or yes instead of prompting. Of the other options, only -V is valid and will produce verbose output. |
274 | 2 | The addition of journaling in ext3 increased filesystem reliability and performance. |
275 | 3 | The -S option displays output in a format such as u=rwx,g=rx,o=rx. The other options listed do not perform the desired operation. |
276 | 2 | The -s option to ln creates a symbolic link, or symlink. |
277 | 3 | The whereis command displays pertinent information about the command given as its argument. For example, entering whereis apache2 on a Debian system will show the binary location, configuration file location, and other relevant details. |
278 | 1 | The PRUNEPATHS option accepts a space-separated list of paths to remove from the results. The other options listed do not exist. |
279 | 4 | The /srv hierarchy is used for data for server programs. The /etc hierarchy is configuration information; /var is also data files but variable, such as mail files. The /tmp directory is for temporary files. |
280 | 3 | The chmod command is used for this purpose, and the u+s option sets the sticky bit for the user on the specified target. |
281 | 2 | The -a option mounts all filesystems in /etc/fstab that are currently available. This option is typically used if the mount points are not mounted at boot time or another mount point is added to the system after it has been booted. |
282 | 2 | The mkswap command formats a swap partition. The fdisk command is used to create the partition itself but not format it. The other two options do not exist. |
283 | 1 | The tune2fs command displays a lot of information about filesystems, and when used with the -l option, the output includes the number of times that the filesystem has been mounted. |
284 | 1 | The -g option displays progress of the dump. The other options listed do not exist. |
285 | 1 | The du command will report on disk usage in a recursive manner, unlike the other commands shown here. |
286 | 3 | The /etc/fstab file is used to store information about the filesystems to mount within the system. |
287 | 4 | The /media mount point is used for removable media. See https://wiki.linuxfoundation.org/lsb/fhs-30 for more information on the FHS. |
288 | 1 | The /etc/mtab file contains currently mounted filesystems. Note that /etc/fstab contains filesystem information but doesn’t report which filesystems are currently mounted. |
289 | 2 | The -r option causes umount to attempt to remount in read-only mode. The -v option is verbose mode, and the -f option forces the operation. The -o option does not exist. |
290 | 1 | The 022 umask will translate into 644 permissions on a new nonexecutable file. |
291 | 3 | The updatedb command will update the database used by the locate command. |
292 | 1 | The type built-in returns the location that the shell will use in order to run the given command. The find command cannot be used for this purpose, and the other commands do not exist. |
293 | 2 | The -R option will perform the change ownership in a recursive manner. |
294 | 4 | The proper order is the device (UUID or partition) or filesystem to mount, followed by the mount point or directory to mount that device, followed by its type and options, and then the dump and pass settings. |
295 | 1 | The blkid command will show partition UUIDs. You can also get this information with the lsblk -no UUID <partition> command. The other commands shown in this question do not accomplish the required task. |
296 | 1 | Priority order for systemd configuration files are those within the /etc/ hierarchy, followed by files in the /run/ hierarchy, followed by files in the /lib/ hierarchy. |
297 | 1 | The -y option causes fsck to assume yes instead of prompting when repairing a filesystem. The -v option is verbosity. There is no -m or -x option for fsck. |
298 | 3 | The -t option sets the filesystem type as ext2, ext3, or ext4. The mke2fs command is typically symlinked from /sbin/mkfs.ext2, /sbin/mkfs.ext3, and /sbin/mkfs.ext4. The -F option forces mke2fs to create a filesystem, and the -a and -e options do not exist. |
299 | 2 | The file /etc/auto.master contains the configuration for autofs. The other files listed as options are not valid for this scenario. |
300 | 3 | The mkisofs command creates an ISO filesystem, which can then be written to a CD or DVD. The other commands listed are not valid. |
301 | 2 | The -c option sets the maximum mount count. The -C option sets the current number of mounts. The -b and -a options do not exist. |
302 | 4 | The -f option, also known as fake, is helpful for situations where you need to debug the mount process or when you need to add an entry to /etc/mtab for a previously mounted filesystem. The -l option shows labels, and -v is verbose. There is no -q option. |
303 | 3 | The letters ro indicate that the filesystem has been mounted read-only, meaning that it is not possible to perform a write to the filesystem. The other possible option is rw, indicating that the filesystem has been mounted read-write. |
304 | 3 | Bad blocks are shown with the -b option. The -f option forces dumpe2fs to perform the requested operation, and the other command options do not exist. |
305 | 4 | Btrfs is based on the copy-on-write principle and is generally considered more advanced than ext4 and its predecessors. FAT is a legacy filesystem primarily used for DOS and its follow-ons like Windows. |
306 | 2 | The xfs_info command, which is functionally equivalent to xfs_grow -n, displays information about an XFS-formatted filesystem. |
307 | 1 | The blkid command shows information about partitions including their type, their UUID, and other basic information. The other commands shown do not exist. |
308 | 3 | The -t option, which can accept a comma-separated list of types, specifies that only filesystems of the listed type are to be unmounted. This is useful in conjunction with the -a option, which unmounts all filesystems except /proc. The -v option is verbose, and -f forces the operation to continue. |
309 | 4 | The sync command writes unwritten data to the disk immediately and is useful to run just prior to attempting an unmount operation. |
310 | 3 | The -f option specifies that xfs_check should check the contents of the named file for consistency. The -v option sets verbosity, and there is no -d or -a option. |
311 | 2 | The -w option causes debugfs to open the filesystem in read-write mode. There is also a -c option to open in catastrophic mode for filesystems with significant damage. The -rw, -r, and -n options are not valid. |
312 | 4 | The smartd daemon monitors SMART-compatible disks for notable events and can be configured to send alerts when events occur. The other commands listed are not valid for this scenario. |
313 | 1 | The -f option forces fsck to run on an otherwise clean filesystem for ext3 filesystems. This can be helpful for times when you suspect there is an error on the filesystem and need to verify the integrity of the filesystem as part of the troubleshooting process. This can also be helpful to prepare the filesystem for conversion, such as might be the case with a tool like btrfs-convert. |
314 | 1 | The block size for import or restore must match the block size used on export or dump. Block size is specified with the -b option, making option A correct. The other options are not valid for xfsrestore. |
315 | 2 | A filesystem with the word defaults for its mount options will be mounted read-write (rw), suid, with the ability to have executables (exec). The filesystem will be auto-mounted (auto), but users will not be able to mount it (nouser). Character and block special devices will be interpreted (dev), and operations on the disk will be performed in an asynchronous manner (async). |
316 | 2 | The btrfs subvolume create command creates a btrfs subvolume. The other commands are not valid. |
317 | 3 | The -z option sets the maximum size for files to be included in the dump. The -b option sets the block size but is not related to what is being asked for in this scenario. The –s option sets the path for inclusion in the dump, and -p sets the interval for progress indicators. |
318 | 3 | The -e option sets the behavior, such as continue, remount read-only, or panic, when an error occurs at the filesystem level. The -f option forces whatever operation you’re requesting to continue even if there are errors. The -d and -k options are not valid. |
319 | 4 | The -n option causes mount to not write to /etc/mtab and is particularly useful for the scenario described. The -a option mounts all filesystems in /etc/fstab. There is no -b or -a option. |
320 | 1 | The swapoff command deactivates swap space, thereby making it unavailable as virtual memory on the system. The other commands shown as options are not valid. |
321 | 1 | The Where= directive specifies the location for the final mounted filesystem. |
322 | 1 | The mkfs.fat or mkfs.vfat commands are valid for creation of FAT filesystems. There is no -f option to mkfs, and there is no mkfat command. |
323 | 4 | The tune2fs command is used for working with ext2, ext3, and ext4 filesystems. The -j option adds a journal. The other commands are not valid. |
324 | 1 | The snapshot subcommand of btrfs subvolume creates a snapshot. The other commands shown are not valid. |
325 | 1 | The -L option forces the log to be cleared or zeroed out, which may cause a loss of data. The -v option sets verbose output; -V prints the version. The -d option performs a dangerous repair, which can be used on a read-only filesystem. |
326 | 3 | The -o option enables the setting of one or more options for the mount command, and ro is read-only. Note that the -r option will also mount as read-only. The other options shown are not valid. |
327 | 2 | The -E option signals that an extended option follows, such as stripe_width. The -f option forces an operation but should not be necessary for this solution, and the -e option sets the behavior on error. There is no -extend option. |
328 | 1 | The gdisk utility is the equivalent of fdisk for working with GPT partitions. Later versions of fdisk can also be used to manage GPT partitions. |
329 | 1 | The maximum size for a partition on an MBR disk is 2 terabytes. GPT has largely replaced MBR on newer Linux systems. |
330 | 3 | The -m option with 0 will format the partition with no reserved blocks for superuser or system use. The -r option sets the filesystem revision. |
331 | 2 | The default time for filesystem reorganization is two hours, or 7200 seconds. |
332 | 3 | The file permissions are 640, meaning that the group owner can read the file. Therefore, changing group ownership should have the fewest side effects. Granting root access is not preferred, especially noting that the problem statement indicated that granting sudo wasn’t preferred. While using chown on the file to change the owner would also work, it’s likely to have additional side effects that could prevent the owner of the file from reading and writing, and there isn’t enough information in the problem for that. Finally, running chmod 777 is almost never the correct solution to any problem on Linux. |
333 | 2 | The -a option shows all devices, even those that are empty. The -r option is for raw devices, and the other options do not exist. |
334 | 4 | USB devices and others removable media can typically be found within the /media/mount point. |
335 | 3 | The mkfs-related commands are typically used for formatting filesystems on Linux. In this case, mkfs.exfat is the correct option for formatting exFAT filesystems. |
336 | 3 | The xfs_db command is used for debugging XFS-formatted filesystems. |
337 | 3 | The -b option is used to specify an alternate superblock and helps in the scenario described, where the superblock has been damaged. The -B option specifies the block size. There is no –s or -o option for e2fsck. |
338 | 1 | The -h option is the flag for human-readable formatting and shows numerical output in larger size increments rather than bytes. The other options are not valid for df. |
339 | 2 | The /etc/profile file is one of a few locations in which default options can be set for users of Bash. The other file locations shown do not exist. |
340 | 1 | A symbolic link will not work. The users would be editing the same file and, without saving as a different filename, would not be able to keep their own edits. |
341 | 2 | The find command will be used for this purpose, and the -uid option will need to be used because the user has already been deleted. If the user had not been deleted, then the -user option would still work. |
342 | 1 | The updatedb command is used to update the locate database. The other commands are not valid. |
343 | 2 | The -f option shows the UUIDs of the filesystems mounted on the system. The -a option shows all devices, the -o option enables specification of output columns, and the -u option does not exist. |
344 | 3 | The -c option checks for bad blocks before formatting. The other options are not valid with mkswap. |
345 | 4 | The sticky bit has been set on the file as denoted by an uppercase S. |
346 | 3 | Using octal form, 4 is user, 2 is group, and 1 is sticky bit. Therefore, 2755 would have setgid for the file. |
347 | 3 | The -name option is used for this purpose, and / indicates the root of the system. A * wildcard is used to indicate all filenames ending in .sql, as described in the scenario. |
348 | 2 | The UUID=<UUID> syntax is correct for the /etc/fstab file. |
349 | 3 | The --inodes option shows inode usage with du. The -h option is human-readable, and -d sets the maximum depth. There is no -i option for du. |
350 | 1 | The -size option is used with find for this purpose, and the +1G argument will look for files greater than 1 gigabyte. Note that if the + is omitted, only files of the exact size are found. |
351 | 2 | A symbolic link is the preferred method because it does not require additional maintenance that a script would or that copying would in order to keep the libraries current. Moving the libraries may have unintended consequences if another program is dependent on the libraries in that location. |
352 | 2 | The PS1 variable usually has its default set in /etc/profile and is used as the shell prompt. Users can customize the prompt to include hostname, working directory, and other elements. |
353 | 3 | The source command is used to execute commands from a file. A typical use case is to create functions or variables that are then available for use within the current session. The other commands listed do not exist. |
354 | 2 | While it’s true that every user has a .bash_logout in their home directory, that file can still be edited by the user. Therefore, to ensure that the required command is executed at logout, the /etc/bash.bash_logout file must be used. |
355 | 2 | The env -u command will unset an environment variable for the current session. The unset command can also be used for this purpose. |
356 | 3 | The -v option, which is the default, tells unset that the name given is a shell variable rather than a function. The other options shown do not exist. |
357 | 1 | The alias command is used for this purpose and its format is name=value, making option A correct. The ln command cannot be used for this purpose because it will not accept command-line arguments for the target in such a format, as shown in the options. |
358 | 2 | User-based configuration files are located in the order .bash_profile, .bash_login, and .profile. Only the first file found is executed and the others are ignored. |
359 | 3 | The $1 variable is automatically available within Bash scripts and represents the first command-line argument. The other variables listed in this question do not exist by default. |
360 | 4 | The fi construct is used to indicate the end of an if conditional within a Bash script. In many languages, if conditionals are scoped by braces such as { }, but in shell scripting, fi is used to denote the end of the condition. |
361 | 2 | The seq command is used to print a sequence of numbers in a variety of formats. The answer for this question provides a starting point (0), and increment (1), and the final number (5), resulting in six numbers being displayed as output. |
362 | 2 | The echo command is used to display its argument, regardless of whether the command is used inside a shell script or from the command line itself. The env command is used to display environment variables and therefore does not meet the need specified in the question. The var_dump command is used within PHP, and ls is used to display contents of directories. |
363 | 1 | The suid bit enables the program to run as the user who owns the file regardless of who executes the program. Using SUID is typically not recommended for security reasons. |
364 | 4 | The exec command executes the command given as its argument and will then exit the shell. The source command does not exit the shell. |
365 | 3 | The double-ampersand sequence executes commands only if the previous command exited cleanly. |
366 | 3 | The read command awaits user input and places that input into the specified variable. The exec command is used to execute commands, and the other options are not valid for the purpose described. |
367 | 1 | Parentheses are used to denote a function, such as myFunction(). The parentheses are optional but are then followed by curly braces containing the commands to be executed when the function is called. |
368 | 3 | The || sequence indicates an alternate command to run if the initial preceding command does not exit cleanly. The && sequence executes only when the preceding command exits cleanly, so it’s just the opposite of what the question was asking. |
369 | 3 | The elif keyword is used to create an alternative execution path within a shell script. The other constructs, such as else if and elsif, are used in other languages. |
370 | 3 | The unalias command is used to remove a previously defined alias. The rm command will remove regular files but not aliases. The other commands do not exist. |
371 | 4 | At a minimum, you need to be able to read the file being sourced; therefore, chmod 400 will correctly set the permissions. Any chmod that gives additional permissions is not necessary. |
372 | 3 | The for loop construct in this case will require the variable name LIST to be preceded with a dollar sign ($),making option C correct. The other options will not work for the purpose described. |
373 | 3 | The -lt operator is used to test for “less than” conditions within a script. The other operators are not valid for use in a shell script. |
374 | 2 | The -e test checks to ensure that a file exists and is typically used in the context of a conditional within a shell script. The other options may work within shell scripts but are not tests for file existence. |
375 | 3 | The /etc/skel directory contains files to be copied to the user’s home directory. The other directories listed for this question do not exist by default. |
376 | 3 | The --norc option causes bash to execute without reading the /etc/bash.bashrc file or the local ~/.bashrc file. The other options listed do not exist as options for bash. |
377 | 3 | The -p option to declare displays fully qualified shell statements such that the statements could then be used as input for another command, either through piping or redirection to a script. |
378 | 1 | The .bash_profile file, if it exists in your home directory, will be executed on login. Note that placing the function in /etc/profile would technically work but then the function would be available to all users, which is not what the question asked for. |
379 | 2 | The readonly command displays the list of read-only variables that have been declared in the current session. The other commands listed for this question do not exist. |
380 | 3 | Square brackets are used to denote the beginning and end of the test portion of a while loop in a shell script. Other languages generally use parentheses for this purpose. |
381 | 2 | The test built-in will return true and can be used to test for the value existence of a variable not being null. Note that the behavior of the test built-in differs depending on the number of arguments. |
382 | 3 | The HOME environment variable, set automatically to the user’s home directory, is consulted when the command cd ~ is entered. The other paths beginning with HOME do not exist by default, and the MAILPATH environment variable shown contains a list of locations where mail is checked when using the shell interactively. |
383 | 2 | The TMOUT variable can be set in a given user’s shell and that user will be logged out after the value given (in seconds) of inactivity. The other environment variables listed here do not exist. |
384 | 2 | Just as with an if statement where the statement is ended with fi, so too is a case statement ended with the word case spelled backward. The curly brace shown as option D is used to close case statements in many languages, but not for shell scripts. |
385 | 1 | The provided answer performs command substitution and places the value from the resulting command into a variable. Note the use of +%s formatting on the date, which then formats the output as seconds since the epoch, as specified in the question. Option C will provide the date within the DATE variable but will not format it as specified. |
386 | 2 | Wrapping a variable in curly braces, such as ${FILEPATH}, will ensure that the variable is interpolated or expanded correctly even when used in a place where it might not normally be expanded, such as within a quoted string. |
387 | 2 | In shell scripts, the commands to execute begin at the do keyword and end at the done keyword. Other languages generally use either curly braces or tabs. |
388 | 4 | The -r test determines whether a given file exists and can be read by the current user. The -e test only checks to see if the file exists. |
389 | 1 | The -r option to declare will create or mark the variable as read-only. The -p option prints output in a format that can be reused. The -x option declares the variable for export. |
390 | 4 | The *) sequence is used to denote a default set of statements that will be executed if no other case matches within the set. |
391 | 1 | Backquotes can be used for command substitution within a Bash script. The other options shown are not valid for command substitution. |
392 | 2 | The character sequence done denotes the end of a while loop in Bash. |
393 | 2 | Greater than or equal to is tested with >=. Of the other operators shown, != tests for inequality. |
394 | 3 | The execute bit is not set on the script, resulting in the permission denied error, making option C correct. The file extension does not matter, so option A is incorrect. Likewise, option B is not correct because the script isn’t even executing. Lowercase or uppercase letters do not matter, making option D incorrect. |
395 | 4 | The -f option exports names as functions to child processes. The other options shown do not exist with the export command. |
396 | 4 | The unset command removes a variable from being set. The other options shown do not exist. |
397 | 1 | The /etc/bash.bashrc file is a systemwide configuration file for the Bash environment. Another systemwide file used for similar purposes is /etc/profile. |
398 | 4 | The +x option enables debugging output and is frequently used when debugging shell scripts. The -x option is used to disable debugging. The -d and +d options do not exist. |
399 | 4 | The .bashrc file in a given user’s home directory is executed for interactive logins. The other files shown do not exist. |
400 | 1 | The function keyword declares a block of code to be a function in Bash. It’s worth noting that the function keyword can be omitted in most cases. The other options are not valid. |
401 | 2 | The syntax shown in option B is the correct syntax to add a path to the current environment. Option A does not include the existing path (and will, in fact, overwrite the existing path). Option C contains spaces, and option D uses a semicolon as a delimiter. |
402 | 4 | The $0 variable is automatically defined and contains the name of the script itself. The other options shown do not exist by default. |
403 | 1 | The -s argument enables setting of a delimiter. When used, the numbers will be printed in a sequence rather than one per line. The -m and -d options do not exist. |
404 | 4 | The -O option is used to determine if the user currently running the test is the owner of the file being tested. The -k option checks to see if the sticky bit has been set. There is no -m file test. |
405 | 1 | A successful return from a command executed within a Bash script is 0. A 1 or higher typically indicates an error condition. There is no C condition. |
406 | 1 | The file is not copied to directories for existing users, making option A correct. There is nothing in the question to indicate that the file is too big or that it already exists. File extensions don’t matter in Linux, so option D cannot be correct. |
407 | 3 | The find command begins the search in the current directory, which is problematic in a scripted scenario like the one presented. The find command can find directories, and those directories can begin with a dot character. |
408 | 2 | The -i option ignores the environment. The other options are not valid for use with env. |
409 | 1 | The -x option enables debugging when passed on the interpreter line of a Bash script. The other options are not valid for this purpose. |
410 | 3 | Doing math in Bash requires a special syntax. The bc command can also be used for such operations and is frequently used for math within Bash scripts. |
411 | 1 | The read command will be used, and option A shows the correct syntax. Option C is incorrect because it does not prompt the user. There is no prompt command, making options B and D incorrect. |
412 | 4 | The -n option removes a variable from being exported. The other options do not exist. |
413 | 1 | The exit code from the previous command is captured automatically in the $? variable, thus ruling out any option that did not have this value. A test for the value is done with -eq in a Bash script, thus making option A correct. |
414 | 4 | The source command is frequently used for the purpose described. The function command can be used to create functions but would not be used for the purpose described. The include and require commands are not valid. |
415 | 2 | Adding the execute bit for the user can be done in a non-octal format, as shown in option B. The only other valid chmod option is 644, which does not grant execute permission. |
416 | 2 | The problem statement specified files, making option B the best answer. Option A will also find directories. |
417 | 3 | The -f option removes a function. The other options do not exist for the unset command. |
418 | 1 | The env command, when used as #!/usr/bin/env bash, will determine the location of the Bash interpreter automatically. This makes the resulting script more portable for systems where Bash may not be located in /bin/. |
419 | 2 | The front slash, or forward slash, is used for division. Of the other options, an asterisk is used for multiplication and the other options are not valid. |
420 | 2 | The mailx command can be used to send mail from the command line. The other options shown are not valid commands. |
421 | 4 | The -s operator tests if a file is not zero size. The -d operator looks for directories, whereas -e merely checks if the file exists. |
422 | 1 | An alias exists only for the length of the current session, making option A correct. If the alias or command was invalid, you would have seen it immediately when you created or used the alias. |
423 | 4 | The correct syntax is shown in option D for the scenario described. |
424 | 2 | The user is most likely not using Bash but is rather using another shell like Tcsh. The user could be logging into a different system, but hopefully by having them log out and log in again that would have been noticed, as would their manual removal of the environment variables. |
425 | 1 | The LOGNAME environment variable contains the currently logged-in user. The other variables do not exist by default. |
426 | 1 | The -h test determines if the file is a symbolic link. The -p option tests if the file is a pipe, and -S returns true if the file is a socket. The -t test determines if the file is a terminal. |
427 | 3 | The -f option marks a function as read-only. The -p option prints a list of read-only identifiers. The -a option assumes that the name is an array, and there is no -r option to the readonly command. |
428 | 2 | Option B is the best answer because it will find files where the user permission includes the execute bit. It’s worth noting that options A and C will find the execute bit but only with the exact permissions specified. |
429 | 1 | The /usr/local/bin directory is the location specified for local binaries according to the FHS. It’s also a typical place for scripts as well. The /usr/bin and /usr/sbin directories are for system binaries, and /home/scripts does not exist by default. |
430 | 4 | Ctrl+c is used to terminate a script and is usually used for terminating programs as well. |
431 | 2 | The -0 option follows each environment variable with a null byte rather than a newline. The other options shown are not valid for use with env. |
432 | 4 | In all likelihood, the cp command has been aliased with the -i option. Running unalias cp will correct the issue. It is possible that the cp command has been recompiled to always ask for confirmation, but this is not the most likely cause. |
433 | 3 | An exit code of 1 usually means error, but in the case of grep it means that the search pattern was not found. |
434 | 2 | The -d test checks if a file is a directory. The -e option checks for existence, and the -a option is no longer used. The -w test checks to see if a file is writable by the current user. |
435 | 2 | The command shown prepends /usr/local/bin on to the existing path. Option A uses $PATH, which is the incorrect identifier for the left side of the assignment. Option C appends /usr/local/bin rather than prepends, and option D uses a semicolon as a delimiter. |
436 | 3 | The until loop construct will execute at least once before the condition is evaluated. The while and for loops both evaluate the condition first. The case statement is not a loop construct. |
437 | 2 | The single dot, ., can be used as a means to source environment variables. The other characters and character sequences do not work for the purpose described. |
438 | 1 | The -p option displays all exported variables. The other options shown do not exist. |
439 | 4 | The word do indicates the beginning of a while loop in a Bash script. The other options shown are not valid for the purpose described. |
440 | 1 | The greeter is configured through /etc/lightdm/lightdm.conf using the greeter-session option. The other options provided here are not valid. |
441 | 2 | The Screen section of xorg.conf is used to logically bind a given graphics card and monitor, each of which would be defined in its own respective section in the configuration file. The other options shown for this question do not exist. |
442 | 1 | Frequency options are Hz, k, kHz, M, or MHz, making uHz an unavailable option. |
443 | 3 | The systemctl set-default command will be used for this purpose, and the target of multi-user is used to boot to the command line. You will also need to remove the word splash from /etc/default/grub and run update-grub as well. |
444 | 1 | The DISPLAY variable can be used to remotely send the windows of an X session to another computer when using protocols like SSH. There is no XTERMINAL or XDISP environment variable, and XTERM is typically a terminal window and not an environment variable. |
445 | 4 | The Welcome option sets the message to be displayed to users within the display manager when they log in. For remote users, the RemoteWelcome message can be used for the same purpose. |
446 | 3 | The Shift key can be used to enable and disable sticky keys within GNOME and other operating systems for accessibility purposes. |
447 | 1 | The Disable keyword is used to ensure that a given module is not loaded. Note that a Load statement for the same module takes precedence over the Disable statement, but Disable can be used to unload modules that are loaded by default. |
448 | 1 | The Orca project provides assistive screen reading capabilities within GNOME. Of the other options given, the screen program is valid but is not used for this purpose. |
449 | 3 | The xrandr command can be used to change resolution, and changing the resolution to something like 800×600 would make icons and other items appear larger. |
450 | 4 | The allow-guest option changes the behavior of guest login for LightDM, and disallowing guest login would generally make the computer somewhat more secure. However, if someone has physical access to the device, they might be able to get access in other ways. |
451 | 3 | The XFree86 -configure command tells the XFree86 server to query for hardware and create a configuration for the recognized hardware. Note that you may still need to edit the resulting configuration file because of unrecognized hardware or to account for specific configuration items. |
452 | 2 | The XkbModel configuration option is used to set the type of keyboard being used, such as pc105 for a 105-key keyboard. The XkbLayout option defines the layout of the keyboard such as US for United States–style keyboards. |
453 | 2 | The VertRefresh option is used for this purpose and accepts a range of values in the manner shown. The other options given for this question are not valid for the purpose described. |
454 | 4 | The file ~/.xsession can be used for commands that run X clients. The other files are not valid for the purpose described. |
455 | 3 | The linear acceleration profile is enabled by setting AccelerationProfile to 6 within xorg.conf. The 0 setting is known as classic, whereas -1 provides constant acceleration (no profile) and 7 is known as limited, which performs the same as linear but with a maximum amount of speed and acceleration. |
456 | 1 | The /usr/share/fonts hierarchy is used for storage of fonts. Another path that might contain font information is /usr/share/X11/fonts, but that was not among the choices given for this question. |
457 | 3 | Kernel versions beginning with 2.6.26 include native support for Braille displays in Linux. |
458 | 1 | The DontZoom option prevents the specified key combinations from changing the video mode. Of the other options, the DontZap option changes the behavior of the Ctrl+Alt+Backspace key combination. The other options don’t have any effect and are not valid in xorg.conf. |
459 | 3 | The xauth program looks for the configuration file in the user’s home directory in the file .Xauthority. The other files do not exist by default. |
460 | 3 | The Xaccess file is used to control access when using XDMCP. The other files are not valid for this purpose. |
461 | 4 | The kmag program magnifies items on a desktop and is used as an assistive technology. In general, kmag can be used with other window managers as well. |
462 | 1 | The SIGTERM signal causes the X server to exit cleanly. SIGKILL would not be a clean exit. The other signals shown as options are not valid signals. |
463 | 2 | The Appearance section of GNOME Control Center is used to set many aspects of how the desktop appears and behaves, including the choice of a high-contrast theme. |
464 | 2 | Mouse gestures are commonly associated with assistive technologies and help to facilitate uses of programs by moving the mouse in a certain way. Mouse gestures could be used for login and to capture screenshots, but those are not adequately or generally descriptive of their use. |
465 | 4 | The Alt+Super+S keyboard shortcut activates the screen reader in GNOME 3.9 or later. The Super+S shortcut enters Overview, and the other shortcuts provided do not have a special meaning by default. Note that the Super key is also called the Windows key or the Command key. |
466 | 4 | The startx command kicks off the display manager after login to a local terminal. The other commands shown do not exist or will not work for the purpose described. |
467 | 2 | The BlankTime option, which is set to 10 minutes by default, causes the monitor to go blank but not actually go into standby or other power-saving modes. |
468 | 3 | The xwininfo command displays information about a given window within an X session. The other commands listed for this question are not valid. |
469 | 1 | The Mouse button displays keys to move the mouse. The Compose button shows a compose keyboard, and the other options are not valid. |
470 | 3 | The xhost command is used to control access to the X server. A host is added with the + sign. |
471 | 2 | The ForwardX11 option must be enabled on the client in order for X connections or windows generated from the X server to be sent over an SSH connection. |
472 | 4 | The FontPath directive provides another location in which the server can find fonts. The other options do not exist within the context of an xorg.conf configuration file. |
473 | 4 | With an on-screen keyboard, users can utilize a pointer such as a mouse to select keys on the keyboard. |
474 | 3 | The XAUTHORITY environment variable can be used to specify the location of the xauth authority file. |
475 | 2 | The Alt+Ctrl+F1 key combination is used to get to a terminal prompt and is helpful in situations where the X server won’t start properly. |
476 | 2 | The autologin-user option is used to define a user who will be automatically logged in to the system. The other options given in this question do not exist. |
477 | 3 | The AccessX utility is used on legacy or older systems to set many of the accessibility options. The functionality provided by AccessX can typically be found in one of the utilities provided by the native X window manager, dependent on the window manager in use. |
478 | 1 | The export shell command sets an environment variable. In this case, the DISPLAY environment variable needs to be set. The env command shown will not set the variable. |
479 | 1 | The Menus option displays the menu options for a given application so that those options can be manipulated with the keyboard. The Activate option helps to work with the desktop and other applications. The other options shown for this question are not valid. |
480 | 2 | The /etc/lightdm/lightdm.conf.d directory contains individual *.conf configuration files for various settings and is typically parsed along with the /etc/lightdm/lightdm.conf file. |
481 | 2 | The COLUMNS environment variable specifies the width in characters of a terminal device. The other environment variables are not valid. |
482 | 3 | The VideoRam option, which can be expressed in bytes, configures the amount of RAM available to the video card. |
483 | 2 | The Depth option sets the color depth for a given monitor display. A typical value might be 24 for this option. |
484 | 2 | The Identifier option provides a unique description of each of the server layouts in an X configuration. The other options shown for this question do not exist. |
485 | 1 | The mkfontscale command will create a fonts.scale file, which describes the outline fonts on the system and is used for configuration of fonts that are manually added to the system. |
486 | 1 | Display Power Management Signaling (DPMS) enables additional power-saving modes, such as a full sleep mode, that enable further energy efficiency for the display. |
487 | 2 | The emacspeak program provides another visual assistive technology as an alternative to Orca. The other technologies listed here are not related to visualization or assistive technologies. |
488 | 2 | Weston is a reference implementation of the Wayland protocol. |
489 | 3 | The SuspendTime sets the time, in minutes, for the monitor to go into standby mode. The other options shown are not valid. |
490 | 3 | The files in /etc/X11/xorg.conf.d/ are included when X is starting. |
491 | 2 | XDMCP, which is typically disabled by default, uses no compression or transport security. XDMCP is therefore not usually preferred for remote access. Of the other options, SSH offers encryption of the session, and XR and RD are not valid protocols. |
492 | 4 | The Xfce desktop environment uses xfwm4 as its window manager. The other options are not desktop environments. |
493 | 2 | The disable-ticketing option turns off simple authentication for clients with Spice. |
494 | 2 | Simon is the speech recognition software that is part of the KDE project. |
495 | 4 | The only valid panel listed in the options for this question is called Universal Access, making option D correct. |
496 | 1 | The setxkbmap command can be used to enable Xkboptions when X is already running. The other commands shown do not exist. |
497 | 2 | The xrdp program is an open source implementation of an RDP server. The other programs shown are not valid. |
498 | 1 | Changing the VISUAL environment variable to an editor that can run over an SSH session will fix the issue. In this case, /bin/vim was used. |
499 | 2 | The -passwd option is used to set the password on the server for x11vnc. |
500 | 4 | The xauth utility is used for working with the X authority file. The other options shown are not valid. |
501 | 3 | Bounce keys cause the interface to not react when keys are accidentally pressed in succession or held down. |
502 | 2 | The TMPDIR environment variable is used if the normal home directory location, ~/.xsession-errors, cannot be opened. The other environment variables are not valid. |
503 | 4 | The xdpyinfo command displays various elements about the current display(s) along with information about X itself. |
504 | 2 | The Weston configuration file is called weston.ini and is located in ~/.config. The other files are not valid. |
505 | 1 | The x11vnc program, an implementation of VNC, offers built-in SSL/TLS capabilities. The other programs shown are not valid. |
506 | 2 | The brltty program enables a text-mode braille display. The other programs are not valid. |
507 | 2 | The xzoom program is used for screen magnification. The other programs shown are not valid. |
508 | 4 | The GRUB_INIT_TUNE variable can be used within the GRUB configuration in order to beep when GRUB is ready for input. |
509 | 2 | The xhost command will be used for this purpose, and the minus sign removes a host from being able to connect. |
510 | 2 | The Xsession script is executed as the user logging in, making option B correct. The Xstartup script is executed as root prior to the execution of Xsession. The other files are not valid as part of the xdm login process. |
511 | 1 | The -nolisten tcp option disables listening for TCP connections for an X server. The other options are not valid. |
512 | 2 | SIGHUP is used for the purpose described, typically when a user logs out. SIGKILL does not restart the server or prepare for a new connection. The other signal names given as options are not valid signals. |
513 | 3 | The greeter-show-manual-login option, when set to true, will require the user to enter a username for login rather than select the username from a list. |
514 | 2 | The -n option disables hostname lookups. The other options shown are not valid. |
515 | 3 | In runlevel 3, accessed through the telinit command, the X server is not typically executed. Runlevel 6 will shut down the system. Runlevel 1 switches to single-user mode, and runlevel 5 is a multi-user mode in which X is usually running. |
516 | 3 | According to the X server documentation at https://www.x.org/releases/X11R7.7/doc/man/man1/Xserver.1.xhtml, the default location is within the /usr/lib path, but it’s worth noting that Linux distributions may change this location to be within the /var/log/ hierarchy. |
517 | 2 | The ~/.xinitrc file can be used for per-user initialization. The other files are not used by default for this purpose. |
518 | 3 | The -nolisten local option can be added to prevent the X server from listening on abstract sockets. |
519 | 4 | The -broadcast option for XDMCP enables sending of BroadcastQuery packets. The other options shown are not valid options with XDMCP. |
520 | 3 | The gdmsetup program is used to configure various options for the login window and environment, including those for local and remote users. The other options are not used for this purpose or do not exist. |
521 | 3 | Any host within the example.com domain can connect. |
522 | 3 | The family inet6 enables the specified host to connect with IPv6. The other methods shown will not work. |
523 | 2 | The ~/.xsession-errors file is the default log file for Xsession and X clients. The other files are not valid for this purpose. |
524 | 1 | The gok command, short for GNOME On-screen Keyboard, is the program to start the on-screen keyboard. The Caribou program will be the successor to GOK. |
525 | 2 | The -f option enables file specification for the X authority file. The -v option enables verbose output. The other options are not valid. |
526 | 2 | Slow keys is the name used to describe this assistive technology. |
527 | 3 | RDP listens on port 3389 by default. Port 389 is LDAP, and 3306 is usually MySQL. |
528 | 1 | The best option among these choices is to change the group to www-data and change the permissions such that the group can write into the directory. Option B should never be used because it enables world-writing to the directory. The other options will not allow the web server group to write into the directory. |
529 | 2 | The format for cron is [minute hour day-of-month month-of-year day-of-week], thereby making option B the correct option for this question. |
530 | 3 | The /etc/localtime file, which can be an actual file or a symbolic link, is used to indicate the local time zone. The other files listed as options do not exist. |
531 | 4 | The LDAP Data Interchange Format (LDIF) is an open format, defined in Request for Comments (RFC) 2849, that enables import and export of LDAP entries. The file formats TXT and CSV are valid but not for the purpose described; there is no specific file format known as LDAP. |
532 | 2 | The chage command will be used for this purpose, specifically with the -E option. When provided with a date, chage will expire the account on that date. When provided with -1, the expiration will be removed. |
533 | 4 | Within the /usr/share/zoneinfo hierarchy, you will find information on the various regions and time zones available. The files within this hierarchy can be symlinked to /etc/localtime. The file /etc/timezone is also sometimes used by Linux systems and, notably, by Java in certain situations. |
534 | 2 | The at command is used to run a series of commands that you enter. Unlike with cron, you can schedule commands from the command line to be executed in the same order entered rather than having to create a specific script for the commands. The syntax shown in option B sets the time to be one hour from now. |
535 | 2 | The userdel command is used for this purpose, and the -r option (lowercase) deletes both the home directory and mail spool files. The -R (uppercase) option tells the userdel command to use a chroot directory. |
536 | 2 | The /etc/shadow file contains usernames, UIDs, and encrypted passwords and is not readable by any non-root user on the system due to the sensitive nature of the encrypted passwords. The /etc/passwd file contains usernames and UIDs but not encrypted passwords. The other two files listed for this question do not exist. |
537 | 3 | Use anacron when you need to schedule a job on a computer that might be off when the job is scheduled. anacron will take care of running the job at its next available time. |
538 | 2 | The +%s option will format the date as seconds since January 1, 1970. This option is used frequently in scripting and elsewhere for obtaining a unique time stamp that can be parsed easily as an integer. The other options will not work. |
539 | 3 | The --list option shows the available character sets on the system. The other options given for this question do not exist. |
540 | 3 | The LC_TIME environment variable is used to control the display and behavior of the date and time and can be changed to a different locale in order to achieve the desired display and behavior of date and time formatting. The other options shown for this question do not exist. |
541 | 4 | Beginning with OpenLDAP version 2.3, slapd-config is used for configuration of OpenLDAP, as documented at http://www.openldap.org/doc/admin24/slapdconf2.html. The other commands are not valid. |
542 | 1 | The @daily shortcut schedules a job to run at midnight every day. The other options shown do not exist. |
543 | 2 | UTF-8 provides multibyte character encoding and is generally accepted as the standard for encoding moving forward. ISO-8859 is single byte encoded. The other options are not valid. |
544 | 1 | The groupmod command will be used for this purpose, and the -n option is used to change the group name. The other commands listed do not exist. |
545 | 4 | The /etc/group file contains information on groups on a Linux system. The other files are not valid for the purpose described. |
546 | 3 | The slapcat command dumps the slapd database in LDIF format to STDOUT. The output can then be redirected into a file. The other commands are not valid. |
547 | 3 | The /etc/cron.d/ directory can contain scripts that have scheduling information within them along with jobs to run. The other locations given as options are not valid. |
548 | 2 | The getent command is used to display entries based on the /etc/nsswitch.conf file. One use case for getent is when integrating with Microsoft Active Directory or another LDAP service to check if the connection can be made to the LDAP server. The usermod command is valid but is not used for this purpose, and the other commands shown for this question are not valid. |
549 | 2 | The /etc/login.defs file contains various configuration items such as the minimum and maximum user and group IDs to be used on the system. |
550 | 3 | The LC_MEASUREMENT environment variable is used to indicate the measurement units that should be used. |
551 | 4 | The TZ environment variable is used for this purpose and the general format is as shown, making option D the correct answer. |
552 | 1 | The /etc/cron.daily directory contains files such as scripts that are executed daily. There are corresponding cron.hourly, cron.weekly, and cron.monthly directories that run on their respective schedules, as indicated by the name of the directory. |
553 | 3 | Setting LANG=C is an alias for Portable Operating System Interface (POSIX) compatibility and will cause programs to bypass locale translations. The other options shown for LANG are not valid. |
554 | 2 | The -m option causes the user’s home directory to be created. By default, if this option isn’t specified and CREATE_HOME has not been set, the home directory won’t be created. The –h option displays help text, and the other options shown are not valid. |
555 | 1 | The usermod -L command locks an account by placing a ! in the encrypted password. If the user has another means to log in, such as with an SSH key, using usermod -L will not prevent their login. |
556 | 3 | The LC_ALL variable can be used to set environment variables to the current locale and will override others. This can be used when there is a need for a temporary change. The other variables listed here are not used for this purpose and are not created by default. |
557 | 1 | The format when adding a username places the username between the schedule and the command to run, making option A correct. The other options shown for this question are invalid. In the case of option B, there is no schedule. In the case of options C and D, the schedule is incorrectly formatted. |
558 | 3 | The passwd command will be used for this purpose. The -a option displays all users but requires the use of -S to indicate status. The -S option alone will not produce a report for all users, and the --all option is an alias for -a. |
559 | 4 | The chage command is used for this purpose. The -d option sets the days since the last password change and is measured in days since January 1, 1970. The -W option is the days of warning for changing a password, and the -l option displays a list of the various settings related to the account. |
560 | 2 | The /etc/anacrontab file contains information about the jobs such as the job name and delay, among other information. The other files listed do not contain anacron-related information about jobs. |
561 | 4 | The ldapadd command is used to add entries to the OpenLDAP database. |
562 | 2 | The /etc/cron.deny file contains a list of users who cannot create cron scheduled tasks. The other files do not exist by default. |
563 | 2 | The system uses shadow passwords if an asterisk shows up in the password field of the /etc/passwd entries. There is no indication that the system has been compromised, making option C incorrect, and there is no password scheme called “forward password aging,” making option A incorrect as well. |
564 | 4 | There is no direct relationship between the UIDs and GIDs on a system. UIDs represent users, whereas GIDs represent group IDs. On some systems, the UID and GID number will match for regular users, but this is not a requirement and is more of a coincidence. |
565 | 3 | The slapindex command generates indexes based on slapd databases. The other commands are not valid. |
566 | 1 | The usermod command is used for this purpose. The -d option changes the home directory, whereas -m moves the contents. The other commands shown for this question are not valid. |
567 | 4 | The -G option is a list of supplemental groups to which the user will be added. A lowercase -g option provides the primary GID. The -l option causes the user to not be added to the lastlog and faillog databases. There is no -x option. |
568 | 1 | The crontab command can be used for this purpose, and the -l option is used to list the crontab entries. The -u option is needed to specify a user other than the current user. |
569 | 1 | The -r option creates a system user that will typically entail no expiration, no home directory, and a UID below 1000. The -s option defines the shell and is not typically used for this purpose. The -a and -S options do not exist. |
570 | 2 | The /etc/gshadow file contains secure information such as an encrypted password for groups, where applicable. The /etc/group file contains general information on groups. The other two files listed as options do not exist. |
571 | 4 | The slapd_db_recover command can be used to help recover an OpenLDAP database that has become corrupted or otherwise invalid. The remaining options for this question are not valid commands. |
572 | 2 | The groupdel command cannot delete groups unless there are no users who have the given group as their primary GID. There is no -f or -r option. |
573 | 1 | The id command shows the username, UID, primary group, and GID, along with supplemental groups. The passwd and chage commands are not used for this purpose. There is no getid command. |
574 | 4 | The -c option changes the comment field in /etc/passwd. The comment field is typically associated with the real name of the account. The -R option indicates a chroot directory, whereas -d indicates a change of home directory. There is no -n option. |
575 | 4 | The find command will be used for this purpose. The correct syntax is shown in option D. The group command will merely look in the specified files for the number 1501, and the -u option to grep includes byte offsets, which is not applicable for this question. |
576 | 1 | The standard port for unencrypted LDAP is 389, and that is the port on which slapd listens for connections. Port 3389 is RDP, whereas 3306 is MySQL. Finally, 110 is POP3. |
577 | 1 | The ln command is used for this purpose, and the -s option creates a symbolic link, and -f forces or overwrites the destination. The other options or order of commands are not valid. |
578 | 3 | The LC_MONETARY variable is used by certain programs to determine the localization for currency. |
579 | 3 | The --on-calendar option adds a timed event with systemd-run. The other options shown are not valid for use with systemd-run. |
580 | 2 | The /etc/cron.allow file is a list of users who have permission to create and remove their own cron jobs. The /etc/crontab file is used to store cron jobs, and the other files do not exist. |
581 | 2 | Debug level 64 provides configuration processing debug information. Debug level 1 traces function calls, whereas level 8 shows connection management. Debug level 0 is no debug. |
582 | 3 | The atrm command removes jobs given their IDs. The ID can be obtained with the atq command. The at -l command shown will list jobs but not delete them. The rmat command is not valid. |
583 | 2 | The dpkg-reconfigure command is used to cause the configuration questions to be asked again. The tzdata package is the name of the package on Debian-based systems. The two apt- commands shown are not valid. |
584 | 4 | There are multiple ways to specify loglevels and debugging for slapd, including by keyword, by integer, or as shown in the question, by hex. All of the values shown are valid for loglevel. No debugging is 0, trace is 1, stats logging is 256 or 512 depending on type, and packets sent and received is integer 16, or hex 0x10. |
585 | 1 | The /etc/skel directory contains files that are automatically copied to a user’s home directory when that user is created. The other directories listed for this question do not exist by default. |
586 | 2 | The atq command shows a list of jobs that have been scheduled with the at command. The other commands don’t exist with the exception of option D, which shows the at command but with an invalid option, --jobs. |
587 | 3 | The port for LDAPS or LDAP over SSL is 636. Port 389 is standard, non-SSL, LDAP. Port 443 is used for HTTPS, and 3128 is used for Squid proxies. |
588 | 1 | The at command runs a command at a specified time. While cron can be used to run a command, it will run the command repeatedly according to the schedule set for the command. The other commands are not valid. |
589 | 4 | The /etc/at.allow file is used to specify users who can create at jobs. The other files are not valid. |
590 | 2 | Systemd timer files have the extension .timer and are used for scheduling service unit files or events. The other file extensions are not used for systemd timer units. |
591 | 1 | The /var/spool/cron/crontabs directory contains a file for each user who currently has one or more cron jobs or entries. Note that the other files listed here are not valid for this purpose. |
592 | 4 | The -j option enables specification of a line from which the import will be started. It is useful in the scenario described where the import needs to be restarted due to error. The -f option specifies an alternate location for the slapd configuration file. The -q option is quick mode, with less checking, and -l specifies the input file. |
593 | 2 | The -a option shows all locales currently available on a system. The other options do not produce the output specified in this scenario. |
594 | 1 | The --adjust-system-clock option sets the system clock when used with set-local-rtc. The other options are not valid. |
595 | 1 | The -i option displays information that can help determine the character set such as ISO-8859, ASCII, or Unicode for the given file. The -m option specifies a list of magic files, -l shows a list of patterns, and -a is not a valid option with the file command. |
596 | 2 | The LC_PAPER variable is used to set the paper size for printing. The other variables are not available by default. |
597 | 3 | The /etc/crontab file is a plain-text file that is treated as a systemwide cron file. As such, the file is generally not associated with any single user and it’s not necessary to run a special command after editing this file. |
598 | 4 | The tzselect command will, by default, display a step-by-step menu to select a time zone. The eventual output will include a region/time zone line, such as America/Chicago, as output. |
599 | 1 | The OnBootSec option is used for this scenario and option A has the correct syntax. The other options shown do not exist. |
600 | 2 | GECOS is the legacy name for information stored in /etc/passwd such as full name and other contact information. |
601 | 1 | The -g option sets the group ID for the newly created group. The -h option is help, and neither -k nor -a exists as an option for groupadd. |
602 | 3 | The list-timers option shows the currently active timers with systemd. The other options are not valid. |
603 | 2 | The weekly shortcut means that systemd will execute the event once a week. The other shortcuts given as options are not valid. |
604 | 1 | The -r option removes the current crontab. The -i option can be added so that the user is prompted prior to removal. |
605 | 2 | The SKEL variable controls the location of the skeleton home directory, which is normally /etc/skel/ by default. The other options shown are not used for the purpose described. |
606 | 3 | The passwd option is used to list the password database on a system. The other options do not exist. |
607 | 1 | The directory /var/spool/cron/atjobs contains the jobs. The other directories shown do not exist. |
608 | 3 | The GID_MIN variable contains the minimum GID to use on the system. The other variables are not used for the purpose described. |
609 | 4 | The MAIL_DIR variable contains the directory where a user’s mail spool is located. The other options shown are not valid variables for this purpose. |
610 | 3 | The /etc/passwd file contains various information about users on a system such as username and real name, along with user ID (UID) and login shell. The file is world-readable. |
611 | 3 | The @reboot shortcut indicates that the cron job will be executed when the system starts up. |
612 | 1 | The -r option specifies that the group being added will be a system group. |
613 | 1 | The directory /var/lib/ldap stores database files related to the OpenLDAP deployment on a given server. The other directories shown are not valid for this purpose. |
614 | 1 | Only active units are shown by default, so the --all option displays all units. |
615 | 2 | The /etc/at.deny file contains a list of users who cannot create at jobs. |
616 | 3 | The journalctl command is used to work with the systemd journal. On systemd-based systems, journalctl is a central command for debugging and troubleshooting. |
617 | 3 | The kern facility receives messages from the kernel for logging purposes. Of the other options, syslog is used for logging messages about syslog itself. The other two options shown are not valid syslog facilities. |
618 | 4 | ntp.org provides a free service for time synchronization. When you use pool.ntp.org as the target, you will typically receive an NTP server that is geographically close to your location, or at least as close as possible. Setting your address to 127.0.0.1 or 192.168.1.100 will use a local server but only if that server has an NTP service. |
619 | 1 | The service used for logging on a computer managed by systemd is called systemd-journald. You use the journalctl command to view logged entries rather than the standard Linux toolset. |
620 | 2 | The create option is used for this purpose and accepts arguments such as those shown to set the permissions and ownership. The other options shown are not valid within a logrotate configuration. |
621 | 4 | Configuration files for CUPS are found in /etc/cups. However, it is also common to manage CUPS through its web interface. The other directories listed are not valid. |
622 | 1 | The Allow directive is used for this purpose and the addresses 192.168.1.1 through .127 signify a /25 in Classless Inter-Domain Routing (CIDR) notation, making option A correct. Note that option B, with a /24 netmask, would allow the addresses too but would also allow 192.168.1.128 through .255, which is larger than should be allowed. |
623 | 2 | The ntpdate command provides a command-line interface that immediately changes or sets the time according to the NTP server given as its argument. The ntpd option provided in option A will run the NTP daemon and would not be appropriate for a script. The other two commands are not valid. It is worth noting that ntpdate has been deprecated in favor of ntpd, but you will likely find ntpdate available on many systems. |
624 | 2 | Typically, the Connection refused message from an NTP-related command means that the daemon is not running. There is no indication that the ntpq command is querying a different server; therefore, whether the network is up or down is irrelevant. The permission-based options are not valid based on the error message indicated. |
625 | 4 | The hwclock command is used to both query and set the hardware clock, such as the one maintained by the system firmware or basic input/output system (BIOS). The ntpdate command is used to set the local system time but is not related to the hardware clock. The other commands are not valid. |
626 | 3 | The /usr/share/zoneinfo directory and its child directories contain information on time zones on a Linux system. The other files and directories do not exist by default. |
627 | 4 | The info severity level provides information messages for a given facility. Of the options given, emerg is used for emergency messages and not normally used by applications, whereas debug is the highest or most verbose level of logging available through syslog. |
628 | 2 | The driftfile configuration option sets the location of the driftfile for ntpd. The drift file helps to maintain time accuracy. The location shown is the default for Red Hat Enterprise Linux. |
629 | 1 | The mail option is used to send the log to the specified email address on completion of the logrotate process. The others shown do not exist as options in /etc/logrotate.conf. |
630 | 3 | The journalctl command is used for this purpose, and the --disk-usage option displays the disk space used by journal log files, which are typically stored in /var/log/ journal. |
631 | 4 | The mailq command is used on Postfix servers in order to view a summary of the current mail queue. Details of the queue include the ID of the mail being sent along with one or more of the email addresses involved in the transaction. The mailq command may also work with newer versions of sendmail. |
632 | 3 | The ntpq command provides an interactive, menu-like interface into the NTP server. You can use ntpq to check statistics on peers, for example. The ntpdate command shown as option B is used as a command-line means to set the time. The ntpd command shown as option A would execute the NTP daemon itself. |
633 | 4 | The format is user: destination for the aliases file, making option D correct. The other options are not valid syntax for the aliases file. |
634 | 2 | The -f option indicates the file to which messages will be logged. The -d option is used for debugging, whereas -v prints the version of klogd. There is no -l option for klogd. |
635 | 1 | The chrony package is used for the scenario described and helps with systems that are frequently offline or disconnected from the network. The other packages listed as options are not valid for the purpose described. |
636 | 1 | The lpr command places a file (or standard input) into the print queue for lpd to work with. The lpq command prints the current queue. There is no lpx command. |
637 | 3 | The -bp option to the sendmail command prints information about the current queue. There is no -queue or -f option that is relevant for this question. The -bi option is used to work with the aliases database. |
638 | 1 | The -w option sets the hardware clock to the current system time. The -s option does the opposite, setting the system time to the hardware clock. There is no -a or -m function for hwclock. |
639 | 4 | TCP port 631 is used as the administrative interface into CUPS. Visiting an active CUPS server on that port will show the administration website for working with print queues and other configuration items related to CUPS. |
640 | 1 | The -q option causes sendmail to attempt to deliver messages from the queue. Add the -v option to display verbose output. |
641 | 2 | The requirements of multiple email addresses prevent the use of .forward; therefore, it will need to be accomplished in /etc/aliases. The format for multiple email addresses is to separate them with a comma, making option B correct. |
642 | 1 | The --systohc command will set the hardware clock according to the current system time. The use of --utc is required in order to ensure that the time is set to UTC. If --utc is omitted, the time will default to whatever was used last time the command was run, which could be UTC but might also be localtime instead. Therefore, the best option is A. |
643 | 4 | The postsuper -d command deletes messages from the queue. The ALL keyword causes all messages to be deleted from the queue. Care should be taken when performing this action because it is irreversible. There is no -remove option to postqueue, and the -f option for Postfix is not relevant. The rm -rf command shown is not specific enough, and it is generally not recommended to manually remove files from a mail queue. |
644 | 1 | The URL shown will display the jobs area of the local CUPS server with a query string name of which_jobs and a value of completed. The other URLs shown are not valid. |
645 | 3 | Just as the tail -f command will continuously update the display as new content is added, so too does the -f option display new entries for journalctl. The -t option shows messages for the given syslog identifier. There is no -tail or -l option. |
646 | 2 | The $UDPServerRun option is used for the purpose described. The port on which the server should listen is then provided as the value for this option. The other options shown are not valid configuration items for rsyslogd. |
647 | 1 | The postqueue -f command is used to flush the queue. The command will process all of the emails that are awaiting delivery. The other commands are not valid for this purpose. |
648 | 3 | The -g option specifies the maximum offset or skew that can be adjusted for when synchronizing time. When set to 0, there is no offset check. |
649 | 1 | The SystemMaxFileSize option controls the size of the journal log file to ensure that a log does not cause problems related to disk usage. The SystemMaxUse option controls overall size of journal files, and the default for SystemMaxFileSize is one-eighth of the SystemMaxUse setting to allow for rotation of files. |
650 | 3 | The lpstat command is used for this purpose. The lpstat command displays information about printers, print jobs, and related information. The -W option specifies which jobs to display, complete, or not complete. The lpq command shown as an option is used to view the queue, and the other options are not valid. |
651 | 4 | The postrotate option within a configuration for log rotation can be used for this purpose. After postrotate, a line typically follows with the script or commands to execute. The other options shown for this question are not valid. |
652 | 2 | SMTP operates on TCP port 25, and if other servers are contacting your SMTP server, then you’ll need to listen on this port and allow traffic to it as well. Port 23 is used for telnet, port 110 is POP3, and port 143 is Internet Message Access Protocol (IMAP), none of which are necessary for SMTP traffic. |
653 | 1 | The makemap command is used to create the hashed database in the correct format for sendmail to use. The other commands are not valid for sendmail. |
654 | 1 | The configuration file for syslog-ng is stored in /etc/syslog-ng and is named syslog-ng.conf. There is not typically an /etc/syslog directory, even on systems without syslog-ng. |
655 | 3 | The application could theoretically use any of the logging facilities, depending on the type of application being developed. However, the requirement to log to a custom log file means that the logs will have a different name and possibly location than the standard logs. Therefore, logging to any of the standard or system-level facilities is not appropriate for this scenario, making one of the local (local0 through local7) facilities appropriate. |
656 | 2 | The usermod command with the -aG option is used to append a group onto the user’s list of groups. In this case, the user needs to be a member of the lpadmin group. |
657 | 4 | The nocompress option is used to prevent the log file from being compressed or zipped as part of the rotation process. This might be needed on systems where compression negatively affects performance or where additional processing is necessary. |
658 | 3 | The cupsctl command should be used with the --share-printers option to enable printing for remote clients within the same subnet. You would then also flag each printer for sharing with the lpadmin command, setting the printer-is-shared option to true. |
659 | 2 | The mailstats command is used for the purpose described. Of the other options, the mailq command will display the current mail queue but not statistics on mail that has been processed. The other two options are not valid commands. |
660 | 2 | The --disk-usage option shows the amount of space consumed by active and archived journals. The other options shown are not valid. |
661 | 1 | The systemctl command is used for controlling services. In this case, restart should be sent to the CUPS service as denoted by the name cups.service. |
662 | 4 | The -p option is used to filter based on priority and the loglevel given in the scenario is debug, making option D correct. The other options are not valid for the purpose described. |
663 | 1 | The Port configuration option is used for this purpose and is used as an alternative to the Listen directive. With the Listen directive, you will specify address:port. However, option C, while valid syntactically, will listen only on the localhost IP of 127.0.0.1 and not all interfaces. |
664 | 1 | The postsuper command is used for management of various items with Postfix, including deletion of individual messages from the mail queue. The other commands will not work for the purpose described. |
665 | 2 | The --vacuum-time option will be used for this scenario. Time can be specified in seconds, minutes, hours, days, months, weeks, and years. |
666 | 2 | The file .procmailrc, found in a user’s home directory, is used by Procmail for processing messages on a per-user basis. The other files are not used by Procmail in a default configuration. |
667 | 4 | The format is local-address: destination-address. Each destination address is separated by a comma. The difference between options C and D is that the question specifically asked for addresses @example.com and since the question didn’t specify whether this server was the server for @example.com, the destination addresses needed to be fully qualified. |
668 | 4 | The postcat command shows the contents of a message from the Postfix queue. The other commands shown are not valid. |
669 | 3 | The /var/log/mail.err file contains errors related to mail delivery. However, on some systems, mail-related errors may go to a different log, such as /var/log/mail.log or /var/log/mail.info or similar. |
670 | 4 | The EHLO command indicates Extended Hello syntax and is followed by the host from which communication has been initiated. Of the other options, the HELO option is valid but is not the Extended Hello syntax specified in the question. |
671 | 1 | The list-timezones option to timedatectl shows the names of time zones and is useful for obtaining the correct time zone name. The other options are not valid with timedatectl. |
672 | 1 | The /etc/localtime file is a symlink to /usr/share/zoneinfo/America/Chicago, making option A correct. Some systems also link /etc/timezone for the same purpose. |
673 | 1 | The date command shows the current time zone. The other options shown will not work. |
674 | 3 | The /etc/chrony.conf file is the configuration file used by the Chrony package. The other files do not exist by default. |
675 | 3 | The -k option shows kernel messages only when used with journalctl. The other options shown do not query the journal. |
676 | 2 | The newaliases command re-creates the aliases database on servers running Postfix, sendmail, and qmail. There is no need to restart the mail server after running newaliases. The alias command shown in option C will create an alias for the command shell but is not related to Postfix. |
677 | 4 | The systemd-cat command logs to the systemd journal. When given a parameter such as a command, both STDOUT and STDERR are logged. The other commands shown as options are not valid. |
678 | 1 | The lprm command is used to help manage printer queues by removing jobs. The other commands shown are not valid. |
679 | 4 | The logger command is used to send messages to syslog and can be executed in a shell script context in order to take advantage of the robustness of syslog without having to write separate log management into the script. |
680 | 3 | The mailq_path parameter contains the path to the mail queue for Postfix. You can use this to diagnose problems with the queue directories. The other parameters shown are not valid in Postfix. |
681 | 4 | The _SYSTEMD_UNIT filter can be used to show messages related to a single service. Multiple _SYSTEMD_UNIT arguments can be given to show messages for multiple services. The other options shown for this question are not valid. |
682 | 3 | The lp command, usually used with the -d option to specify the queue name, is used to add a job to the specified print queue. The other commands shown as options are not valid. |
683 | 2 | When the .forward file is found within a user’s home directory, forwarding of email will typically occur when mail is destined for that user. |
684 | 2 | The -s option sets the subject for the email to be sent. The -E option informs mail to not send messages that have an empty body. The -c option enables setting of carbon-copy (CC) addresses. The -f option specifies an alternate mailbox and would not be used for this scenario. |
685 | 4 | The -s option sets the date and time as specified within the command. If there is another means to automatically set the date, it may override the change. For example, if ntpd is running, that process may alter the date even after it has been set with date -s. |
686 | 2 | The --vacuum-size option to journalctl will trim the journal data files so that they consume the specified size. It is worth noting that the size may not be exactly that specified because journalctl deletes only archived files. |
687 | 1 | The --since option filters journal messages based on the time elapsed since that specified. There is also a corresponding --until option that enables further time filtering. |
688 | 3 | The use of - indicates that syslog does not need to sync to disk for every log entry. This can greatly improve performance for busy systems but may cause log entries to be lost if the sync process has not been run prior to a system crash or other issue. |
689 | 1 | The -P option sends a print job to the specified destination. Of the other options shown, -h disables banner printing, and the remaining options do not exist for lpr. |
690 | 3 | The qshape command displays information regarding the number and age of the messages in the Postfix incoming and active queues. Other queues can also be viewed using the command as well. The other commands shown as options for this question are not valid. |
691 | 4 | The SystemMaxUse configuration option configures how much space journal files can take on the system. The other options shown are not valid, but it is worth noting that there are several options for controlling journal sizes and these options should be examined as part of preparation. |
692 | 3 | The /var/spool/postfix directory contains directories and files related to the mail queue for Postfix. The other directories listed are not valid for this scenario. |
693 | 4 | The --directory or -D option can be used to specify an alternate location for the journal data and would support the scenario described. The other options are not valid with journalctl for the scenario described. |
694 | 3 | The /var/log/ directory is the normal location for system logs, and daemons will typically use this hierarchy for logs as well. For example, some Linux distributions use /var/log/journal/ for systemd journals. The other directories shown as options do not exist by default. |
695 | 3 | The :blackhole: option can be used as a destination to prevent Exim from delivering the mail for that particular user or email account. The other options shown for this question are not valid. |
696 | 3 | The <DefaultPrinter printerName> stanza, where printerName is the name of the printer, configures a printer for CUPS. |
697 | 3 | The lprm command can be used for this purpose and, when given a single dash, will delete all jobs from the queue if run as root. The other options given for lprm are not valid. |
698 | 2 | The -r option enables setting the From header of the email to be sent rather than the currently logged-in user. The -f option specifies a different mailbox and is not useful for this scenario. The -o and -m options do not exist. |
699 | 2 | The @@ symbol specifies that TCP should be used rather than the default @ that normally precedes a host using UDP for remote logging. |
700 | 3 | The Storage=Persistent key/value pair within the [Journal] stanza of the configuration file enables persistent storage for the journal. The other key/value pairs are not valid. |
701 | 1 | The chronyc command can be used for monitoring the status of time updates. The other options shown are not valid commands. |
702 | 3 | Individual configuration files for various log file rotation policies are found in /etc/logrotate.d. This directory is included in the primary configuration file /etc/logrotate.conf. |
703 | 1 | The postqueue -p command and option view the pending queue. The postqueue -f command causes the queue to be flushed. The other commands shown are valid, but their options are not. |
704 | 1 | The netstat command can be used for this purpose, and the -r option displays the current routes. The addition of -n prevents DNS lookups, which can help with performance. |
705 | 1 | The ifconfig command will be used for this purpose and requires the addition of the -a option because the adapter is currently down. The ifup command can be used to bring up an interface but does not display information by default. The netstat command displays information about the network but not with the -n option. |
706 | 4 | Private IP addresses are found within the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 ranges, making an address in the 143 range a public IP. |
707 | 3 | The route command is used for this purpose, and adding a route is done with the add option. The default gateway is added using the default gw keywords followed by the IP of the gateway and the adapter. |
708 | 1 | The host command enables changing of the query type with the -t option. Using ns as the type will query for the name servers for a given domain. There is no all type, and the other options are also invalid. |
709 | 2 | Traditionally, udp/53 is used for DNS queries, but with a primary and secondary server it is assumed that zone transfers may occur. DNS zone transfers typically take place over tcp/53. |
710 | 2 | The -I option enables the choice of interface. A lowercase -i option sets the interval, whereas -a indicates an audible ping. Finally, -t enables a time-to-live (TTL)-based ping only. |
711 | 4 | A /27, with a netmask of 255.255.255.224, splits a subnet into four segments of 32 addresses, thus enabling 30 usable addresses. |
712 | 1 | The host or dig commands can be used for this purpose by setting the type to mx. The mx type will query for the mail exchanger for the given domain. There is no smtp type. |
713 | 2 | The localhost address for IPv6 can be written as ::1. Addresses shown like 127 represent the IPv4 localhost range but are not written properly for IPv4 or IPv6. |
714 | 1 | The -T option causes traceroute to use TCP packets. This option, which requires root privileges, can be helpful for situations where a firewall may be blocking traceroute traffic. The -i option chooses the interface, whereas -s chooses the source address. A lowercase -t option sets the Type of Service (ToS) flag. |
715 | 3 | The ifup command is used to bring up network interfaces, and the -a option brings up those interfaces marked as auto. Likewise, ifdown can be used to turn off network interfaces. The ifconfig -a command displays information on all interfaces, and there is no ifstat command. |
716 | 4 | The hostname command is used to return the hostname and domain. When given the -d option, just the domain name is returned to STDOUT, thereby making it appropriate for use in a script. |
717 | 1 | The ip command with the monitor option/subcommand will display netlink messages as they arrive. There is no netlink subcommand for ip, and the route command will not work for this purpose. |
718 | 4 | The -6 option, as in traceroute -6, executes an IPv6 traceroute. The other options shown for this question are not valid. It would be rare for the traceroute6 command to not be available and still have the traceroute -6 command available. |
719 | 1 | The syntax is database: databasename with additional database names separated by spaces, as shown in the correct option for this question. |
720 | 1 | The @ symbol is used to indicate a server to which the query will be sent directly. This can be quite useful for troubleshooting resolution problems by sending the query directly to an authoritative name server for the domain. Of the other options, -t sets the type and the others are not valid. |
721 | 4 | SNMP traffic takes place on ports 161 and 162. Though the traffic is usually on UDP, the TCP ports are also reserved for SNMP. Ports 110 and 143 are used for POP3 and IMAP, respectively, whereas 23 and 25 are telnet and SMTP. Finally, ports 80 and 443 are HTTP and HTTPS. |
722 | 1 | The getent command is used for working with NSS databases, and getent hosts will display the available hosts using the databases configured in /etc/nsswitch.conf. |
723 | 4 | A /25 in CIDR notation represents half of a /24 in address space, therefore making 255.255.255.128 the masked bits. The 255.255.255.0 option is /24, whereas 255.255.255.192 is a /26. Finally, 255.255.0.0 is a /16. |
724 | 3 | The configuration option is called nameserver, and the value for the option is the IP address of the desired name server. There are several options that affect how name resolution is performed, such as the number of attempts and timeout. Also, the order in which name servers appear affects in which order the name servers are queried. See resolv.conf(5)for more information. |
725 | 4 | The /etc/services file contains standard port-to-protocol information based on the well-known and assigned ports from the Internet Assigned Numbers Authority (IANA). If you’d like to provide a custom name for the service, you can do so by editing this file. There is no /etc/ports or /etc/p2p file by default, and /etc/ppp is usually a directory for the Point-to-Point protocol daemon and related services. |
726 | 1 | The route command can be used for this purpose, and the syntax includes the network range, denoted with the -net option, followed by the word netmask and the masked bits, followed by the lettersgw and the IP of the gateway. The other options shown are invalid for a variety of reasons, including missing keywords and options and order. |
727 | 3 | The -a option displays statistics for each socket, both listening and non-listening. Included in this information is the send and receive queues. This information can be used to gauge performance and potential bottlenecks. |
728 | 1 | The correct format is the IP address followed by canonical hostname followed by any aliases for the host. You can use entries in /etc/hosts to override DNS lookups, which can be useful to prevent those names from resolving or to provide a different resolution. |
729 | 3 | The ifconfig command for configuring interfaces begins with the device followed by the IP address, which is then followed by the netmask keyword and the netmask you want to add. Because this is a /24, the netmask is 255.255.255.0. |
730 | 3 | IPv4 addresses are 32 bits in length and IPv6 addresses are 128-bits. Both IPv4 and IPv6 can be used on internal and external networks alike, and subnetting is indeed necessary with IPv6. |
731 | 4 | ICMP is a layer 3 protocol, meaning that it does not use ports for communication. TCP/43 is used for whois whereas port 111 is used for sunrpc. UDP/69 is used for the TFTP protocol. |
732 | 2 | The ip route command can be used for this purpose, and its syntax uses a change command and the via keyword. The same operation could be completed with the route command but would require deleting the existing gateway first and then re-adding a new default gateway. |
733 | 3 | Secure Shell (SSH) operates on TCP port 22 by default. TCP/23 is used for telnet, TCP/25 is used for SMTP, and TCP/2200 is not associated with a well-known service. |
734 | 2 | The nc command is used to start netcat and the -l option causes it to listen. The -p option is used to specify the port on which netcat will listen. The -s option specifies the local source address and is not used for this scenario. |
735 | 1 | The soa type is used to query for Start of Authority records for a domain. Note that in many cases, dig will attempt to look up the domain within a given command and may not appear to have had an error. For example, when running option D (dig -t auth example.com) you will receive information about example.com and there will be a line in the output that dig has ignored the invalid type of auth. |
736 | 1 | The search option is used for this purpose and can be provided with multiple domain names, each separated by a space or tab. The domain option is valid within /etc/resolv.conf but does not allow for multiple domain names. On newer systems, systemd-resolved has taken over for the /etc/resolv.conf file. |
737 | 3 | The ping6 command is used to ping IPv6 addresses. Unique local addresses are the IPv6 equivalent of RFC 1918 private addresses in IPv4. In IPv6, fc00::/7 is the unique local address space. Note that there is no -6 option to the normal ping command. |
738 | 1 | The route command can be used for this purpose, and in the scenario described, a reject destination is used for the route. The other options shown are incorrect because they use invalid options to the route command. |
739 | 2 | The tracepath command provides the maximum transmission unit (MTU) of the hops where possible. Both traceroute and tracepath can be used internally or externally, and both provide IPv6 capabilities, though traceroute6 and tracepath6 provide IPv6 capabilities as well. Certain options with the traceroute command can require root privileges, but not enough information was given in the question for that to have been the correct option. |
740 | 4 | The -c option provides the count of the number of pings to send. The -n option specifies numeric output only, whereas -p specifies the pattern to use for the packet content. Finally, the -t option sets the TTL. |
741 | 1 | The nmcli command provides a command-line interface suitable for working with NetworkManager through a terminal or SSH connection. The nmtui command provides a curses-based interface that also works through a terminal or SSH connection. |
742 | 1 | The syntax for ifconfig uses the device—in this case followed by the protocol inet6— and then the keyword add to indicate that an additional IP address is being added, followed finally by the address itself. |
743 | 3 | LDAP over SSL, or LDAPS, operates on port 636. Port 53 is used for DNS, port 389 is used for normal, non-SSL LDAP, and port 443 is used for HTTP over SSL. |
744 | 4 | The best option for this question is to add an entry for the host in /etc/hosts. Doing so will always cause DNS queries to resolve to 127.0.0.1. The other options are not as robust because they rely on www.example.com always having the same IP address, or the solutions require additional maintenance to constantly add new IP addresses if www.example.com’s IP address changes. |
745 | 1 | The ip route flush cache command should be executed after changing the routes. The other commands shown for this question are not valid. |
746 | 1 | SPF records are stored in the txt record type in DNS, making -t txt the correct option for this. Of the other options, only -t mx is valid and returns the mail exchangers for the given domain. |
747 | 2 | TCP is a connection-oriented protocol that uses a three-way handshake to establish a connection. ICMP does not use ports for communication, and UDP is connectionless. IP is the core Internet Protocol and does not use a handshake. |
748 | 4 | There are 1,048,576 IP addresses in the 172.16.0.0 private range. There are 16,777,216 in the 10.0.0.0 range and 65,536 in the 192.168.0.0 range. |
749 | 3 | The only viable possibility of those listed is that ICMP traffic is blocked. TCP traffic is obviously passing because of the ability to get there using HTTP, and DNS must also be working. |
750 | 3 | The G signifies a gateway within the route table. |
751 | 1 | The axfr type is a zone transfer, and the @ symbol signifies the server to which the query will be sent. There is no xfer type, and option B is just a normal query for the domain sent to the specified server. |
752 | 4 | The netstat -s command displays aggregate statistical information for networking, including the total packets received and the number of packets forwarded. The ifconfig command does not show packets forwarded. The ls command is not used for networking, and the ipstat command does not exist. |
753 | 3 | The ip command defaults to the inet family if not otherwise specified with the -f option. The command will attempt to guess the correct family and fall back to inet. The other families listed as options for this command are not valid for use with the ip command. |
754 | 2 | The ifconfig command will be used for this purpose, followed by the interface. The hw keyword is used for the hardware address, which is then followed by the hardware class, in this case ether. That is followed by the new MAC address (not depicted in the options). The other commands are not valid. |
755 | 4 | The -n option causes route to use numeric values only, performing no name resolution. This option is useful for the scenario described. The -e option causes the output to be in netstat format. There is no -d or -f option for the route command. |
756 | 1 | Because we’re working with MAC addresses, the arp command will be used. The -d option removes or deletes an Address Resolution Protocol (ARP) entry, which would be appropriate here so that the MAC address resolution occurs again. The netstat command will not be used for this purpose. The hostname and dig commands work with name resolution but not for MAC addresses or the ARP table. |
757 | 1 | The iw command will be used for this purpose. When using iw with a specific device, the dev keyword appears next, followed by the device name and then the command you want to execute on that device. In this case, the link command is used. |
758 | 2 | The iwconfig command, which is similar to the ifconfig command, works with an individual wireless interface to set and display parameters. Of the other commands, the ifconfig command is valid but not used for wireless. The other commands are not valid. |
759 | 3 | The iwlist command will be used for this purpose, and the scan subcommand is used to look for local access points and wireless networks. Superuser privileges are required for a full scan. The iwconfig command does not have a scan subcommand. Likewise, there is no subcommand called get for the iwlist command, and there is no iw-scan command. |
760 | 2 | NTP listens on UDP port 123 by default. Ports 20 and 21 are used for FTP services, port 139 is used by NetBIOS, and port 5150 is not usually used. |
761 | 2 | The mtu can be used to set the value for the maximum transmission unit (MTU) for a given interface. The metric option sets the interface metric. The other options are not valid. |
762 | 1 | The -s option creates an ARP table entry. The -d option removes an entry. The -c and --add options do not exist. |
763 | 1 | The ss command provides many of the same functions as netstat but can show some extended information, such as memory allocation for a given socket. The free command shows memory usage but not by socket, and the other two commands do not exist. |
764 | 4 | The -f option is a flood ping. This will effectively cause the interface to send and receive large amounts of traffic, usually making it easier to find on a switch. The -a option is an audible ping, emitting a sound on ping. The -c option sends a certain count of pings, and there is no -e option. |
765 | 2 | The netcat command provides a method for opening and communicating on both sides, server and client, for a TCP connection. The netcat command avoids some of the issues with telnet capturing characters specific to the Telnet protocol. The netstat command does not test connectivity, and ping does not do so at the TCP level. There is no nettest command. |
766 | 3 | The -D option lists the interfaces on a given computer. The -d option dumps compiled matching code, and -i selects an interface. There is no -a option. |
767 | 1 | The ping6 command performs the same as the IPv4 ping command but does so for IPv6. The other commands are not valid on Linux. |
768 | 2 | The ip command can be used for this purpose. When using it with the addr object and the -6 option, only information about IPv6 addresses will be shown. The first option, simply ip addr, will show all addresses, including IPv4. The other commands are not valid. |
769 | 1 | The ifconfig command will be used for this purpose, and ARP can be disabled by preceding the word arp with a minus sign, as shown. If no minus sign is present, then ARP will be enabled. The other commands will not work for this scenario. |
770 | 3 | The dev option specifies the device to use for the route being specified. This is a typical use case for many routes to reduce the chance of the kernel guessing incorrectly. The other options shown for this question are not valid. |
771 | 3 | The -p option shows the process IDs associated with a given socket within the ss output. The -a option is all sockets, whereas -l is listening sockets. The -f option is used to specify the protocol family. |
772 | 3 | The -I option tells traceroute to use ICMP for requests. The -T option is TCP SYN. The -A option performs AS path lookups, and the -i option configures traceroute to use the specified interface. |
773 | 3 | Internally, the hostname command uses gethostname. This can be useful to know when troubleshooting address resolution issues such as conflicting results for host naming. The other functions are not valid. |
774 | 1 | The grep command used with the -i option makes the grep case insensitive. When used with the -v option, grep will exclude the argument, thus doing the opposite of what’s needed here. The kernel ring buffer will probably not contain information about DHCP, making dmesg an incorrect option. |
775 | 2 | Only alphanumerics, minus/dash, and dot are valid for hosts in /etc/hosts. |
776 | 2 | Options within /etc/resolv.conf are preceded with the options keyword followed by one or more options, such as debug. |
777 | 4 | The journalctl command will be used for this purpose. Adding the -u option specifies the unit for which journal entries are desired. |
778 | 1 | The /etc/hostname file typically contains only the hostname of the local computer rather than the hostname and domain name. This is then read at boot time to set the hostname for the computer. The /etc/hosts file contains information on various hosts for name resolution purposes. The other files do not exist. |
779 | 2 | The traceroute6 command is used for tracing IPv6 routes. The other commands do not exist. |
780 | 4 | The axfr type can be used with dig to request a zone transfer. The client from which you request the zone transfer will need to be authorized to initiate a transfer. |
781 | 1 | Setting -a as an option to the host command sets the query type to ANY. The -c option sets the class, and -d turns on debugging. There is no -b option. |
782 | 3 | The .digrc file, when created in a user’s home directory, can be used to set defaults for use of the dig command. There is no dig configuration file found in /etc. |
783 | 4 | POP3 servers do not have a specific type in DNS. MX type indicates mail exchanger, or SMTP server. |
784 | 1 | The ip addr add command is used to add IP addresses to interfaces using the syntax shown in option A. The other options do not have the correct syntax. |
785 | 2 | The resolvectl command is used for assistance with resolution issues for systemd-resolved and, when given the status command, will return the DNS settings. The other options shown do not exist. The resolvectl command is somewhat new, and if it’s not yet available on a given systemd-based distribution, then systemd-resolve --status can be used. |
786 | 1 | The nmcli command is the only valid NetworkManager command shown as an option, and when given the networking on command, NetworkManager will control the network interfaces. It is worth noting that if you disable NetworkManager control with networking off then all of the previously managed interfaces are disabled. |
787 | 2 | NXDOMAIN is the status for a nonexistent domain or host, basically that the host for which the query was sent does not exist. A normal status when there has not been an error is NOERROR. |
788 | 3 | The systemd-networkd daemon can be used to manage networking through systemd. The other options shown are not valid. |
789 | 2 | The set-hostname command within hostnamectl sets the hostname of the device. The other commands shown are not valid for use with hostnamectl. |
790 | 1 | IMAPS uses port 993 by default, as defined by IANA. Port 995 is POP3S, port 465 is SMTPS, and port 514 is used by syslog. |
791 | 2 | The -o option removes newlines from the output, making the output more suitable for the grep command. The -l option specifies the number of loops for the ip addr flush command, the -f option specifies the protocol family, and there is no -n option. |
792 | 1 | If /etc/nologin exists, users will be prevented from logging in to the system. The root user can still log in, assuming that root logins are enabled within the ssh configuration. |
793 | 2 | The find command will be used for this purpose, and the permission can be described as 4000 to indicate the presence of the setuid bit. The -type option can be used to change the type of object to be returned but is not relevant for the scenario described. |
794 | 2 | The lsof command can be used for this purpose and, with the -i option, will display the network ports along with their process. The netstat command, when run with the -a option, will display network ports but not the process. The ps command is used for processes but not network ports. Finally, there is no netlist command. |
795 | 1 | The fuser command can be used to determine which process is using a given file. The ls command will show files and find can be used to find files but not specifically for this purpose. The ps command does show processes but not necessarily ones tied to a particular file. |
796 | 4 | The chage command is used for working with account aging information such as expiration date, password change, days between password changes, and so on. The -l command lists information for the given account. The usermod command is used to make changes to an account, and the other two commands are not valid. |
797 | 1 | The nmap command is used to scan for open ports. By default, the nmap command will scan for open TCP ports to the address or addresses specified. The other commands shown do not scan for open ports to external (off-host) IP addresses. |
798 | 2 | The ssh-keygen command is used to create a key pair for use with ssh instead of a password. Of the other options, the ssh command does exist but the -k option is used to disable Generic Security Service Application Program Interface (GSSAPI) credential forwarding and not for the purpose described. |
799 | 2 | The format is username (or other specifier) followed by hard or soft, depending on the limit type, then the keyword followed by the value for that given keyword. |
800 | 1 | The authorized_keys file, stored in the .ssh directory in your home directory, contains public keys that are authorized to log in to the server using their corresponding private key. |
801 | 3 | The -p option shows the process ID to which a given port is connected and is useful for displaying information about which process is listening on a given port. The -a option shows listening and nonlistening sockets whereas -n disables name lookups. The -l option shows listening sockets only. |
802 | 4 | Loading alternate files is accomplished using the -f option. Doing so facilitates exactly the scenario described, being able to examine logins from old log files. The -a option controls the location of the display for the host, whereas -t controls the display to output the logins as of the specified date and time. There is no -e option. |
803 | 4 | The w command shows currently logged-in users along with information such as uptime and load average. The fuser command is used to show open files, and the -u option to ls controls the display for file listings. There is no listuser command. |
804 | 1 | The -u option is correct for this purpose. An uppercase -U option sets the user context for listing privileges. The -s option sets the shell, and the -H option sets the home directory. |
805 | 2 | The NOPASSWD option causes sudo to not prompt for a password for a given sudo command. This is useful for scripted scenarios where a password prompt would cause problems. |
806 | 3 | The ulimit command shows such limits, and the -a option shows all limits for the currently logged-in user. The other commands are not valid. |
807 | 3 | The syntax to block access to every service uses the ALL keyword followed by the address or network to which the policy will apply. |
808 | 1 | The correct format is YYYY-MM-DD for the usermod command. |
809 | 3 | The disable option is used for the purpose described, and can be set to yes or no. The other options are not valid for this scenario. |
810 | 1 | The file is named id_rsa by default, and the public key is named id_rsa.pub. For DSA keys, the names are id_dsa and id_dsa.pub. Other key names such as id_ecdsa, id_ ecdsa.pub, id_ed25519, and id_ed25519.pub are also used depending on the algorithm. For client keys, these are typically stored in ~/.ssh/ by default. |
811 | 3 | The -c option executes a single command but does so without an interactive session. The -s option specifies the shell to be used. There is no -u or -e option for the su command. |
812 | 1 | The /etc/security/limits.conf file (on some Linux distributions this file could be /etc/limits.conf) enables the setting of limits for user logins, processes, memory usage, and other resources. The other files shown do not exist by default. |
813 | 2 | There is no special option necessary in order to execute a single command on a remote host with ssh, although you might sometimes place the command in quotes if spaces are included. The -s option requests a subsystem and is not related to this scenario. The -e option specifies an escape character. |
814 | 4 | The ssh-add command is used to list currently loaded keys and is used in conjunction with ssh-agent. There is no -l option to ssh-agent, and the -l option to ssh specifies the login name to use. There is no ssh-list-keys command. |
815 | 3 | While any text editor can be used, it is highly recommended that you use the visudo command to edit /etc/sudoers. Using visudo enables syntax checking, which will help to prevent issues with an invalid configuration, causing problems for those who rely on sudo. |
816 | 1 | The systemctl command will be used for this purpose, and the subcommand is disable. There is a stop subcommand, but it will only stop the given service rather than prevent it from starting on boot. The other options are invalid for various reasons, including that they use systemd as the command name rather than systemctl. |
817 | 2 | The chage command can be used for this purpose, and the -E option accepts days since 1/1/1970. There is no -e option to passwd, and -l for usermod will not perform the action described. There is no chguser command. |
818 | 3 | The GlobalKnownHostsFile configuration option enables the specification of a server-wide known hosts file, thus preventing users from needing to accept host keys for the hosts specified therein. |
819 | 3 | The maxlogins parameter is used to control the number of simultaneous logins for a given account. |
820 | 2 | The ssh_known_hosts file, typically kept in /etc/, is used for the purpose described. Note that on some systems, this file and other SSH-related configurations may be found in /etc/ssh/. The options that indicated ~ or within /root are incorrect because the question specified a server-wide list. |
821 | 3 | The date of the last password change, as measured in days since January 1, 1970, is contained in the third field of a shadow entry. The expiration date would be the 8th field, as separated by colons. |
822 | 1 | The format for local forwarding uses the -L option followed by the local port and then the remote host:port combination. This is typically followed by the user@host credential and destination information for the SSH connection itself. |
823 | 3 | The option is called X11Forwarding and it must be set to yes in order for the destination server to forward X-based windows to the local client computer. The other options shown are not valid. |
824 | 1 | The --gen-key subcommand is used for the purpose described. The other options shown do not exist. |
825 | 1 | The --sign option is used to sign files and documents with gpg. The other options shown are not valid for signatures. |
826 | 1 | The -p option sets the port for login and is useful for scenarios where you cannot use the host:port syntax. There is no -P or @ option with ssh, and the -l option specifies the login name. |
827 | 1 | The -s option sets the type of scan and, when followed by an uppercase S, sets the option to SYN. The T option is a Connect() scan. There is no Y or -type option for nmap. |
828 | 3 | The wtmp file, stored in /var/log, is used to store recent login information and must be read with the last command due to its format. The other logs listed for this question are not default logs found on a Linux system. |
829 | 1 | The -i option for ssh is followed by the private key to use for authentication. Doing so implies that the public key is in the authorized_keys file on the remote host. The -k option disables sending of GSSAPI credentials, whereas -f is used to request backgrounding of ssh. There is no --key option. |
830 | 1 | The -n option facilitates the scenario described and will exit non-zero rather than prompting. The -i option sets the login name and is not valid for this scenario. The -q and the --noprompt options do not exist. |
831 | 3 | The ssh-keygen command will be used for this purpose, and the -t option specifies the type of key to generate. There are no key-related generation options for the ssh command. |
832 | 2 | Lines can be commented out of /etc/inetd.conf with a pound sign or hash mark (#). After making changes to /etc/inetd.conf, the service should be restarted. |
833 | 1 | The -L option to usermod can be used to lock an account. The lowercase version, -l, is used to change a username. The other commands do not exist. |
834 | 2 | The pubring.gpg file, found in ~/.gnupg/, contains the public keyring. |
835 | 3 | The .gpg-v21-migrated file, when present, indicates that gpg version 2.1 or later is in use and that the files have been migrated for that version or a later one. |
836 | 4 | The find command will be used for this purpose, and the -perm option is needed, specifically as the 2000 permission to indicate setgid. Note the use of / to indicate that the entire server will be searched. The grep command shown cannot be used for this purpose because it looks for the presence of the string 'setgid' within files located in the current directory only. |
837 | 3 | The update-rc.d command creates symbolic links from a service file in /etc/init.d/ to the appropriate locations in /etc/rc.d/* for each runlevel. The other commands shown are not valid. |
838 | 1 | Single-user mode is typically runlevel 1. In runlevel 1, no network services are started. Runlevel 2 has networking but typically not services. Runlevel 5 is full multiuser with networking, and runlevel 6 is reboot. |
839 | 3 | The - option is the typical option passed to su for login. There is no -u or -U option, and the -login option does not exist. There is a --login option with two dashes, but that is not what’s shown. |
840 | 1 | The netstat command is used for this purpose, and the -a option displays all sockets, listening and nonlistening. Note that it’s frequently helpful to add the -n option, or combine them as in netstat –an, in order to prevent name lookup. Doing so can significantly improve the performance of the command. |
841 | 3 | This solution will require a way to filter out the bind user; therefore, options that grep for bind or specify bind as the user are incorrect. However, the lsof command allows for negation with the caret (^) character. Therefore, listing all files except bind requires the syntax shown. |
842 | 2 | The -R option requires an attempt at name resolution be performed. The -n option does the opposite; it disables name resolution. There is no -b or -a option. |
843 | 3 | The PARANOID wildcard specifies that the hostname and IP must match. The ALL keyword is also a valid wildcard in TCPWrappers for use in both /etc/hosts.allow and /etc/hosts.deny. |
844 | 1 | The PermitRootLogin directive, set to yes or no, determines whether the root user can log in directly. The other options shown are not valid. |
845 | 2 | The nmap command will be used for this purpose, and the -sT option performs a TCP connect to the specified host or network. The other commands are not valid. |
846 | 3 | The -X option enables X11 application forwarding through an SSH connection. The -A option is used for authentication agent forwarding, and -F indicates a per-user configuration file. There is no -X11 option. |
847 | 2 | The --output option is used with --encrypt to send the output to a specified file. The other options shown are not valid for gpg. |
848 | 2 | The ssh-add command adds keys to ssh-agent. The other commands shown are not valid. |
849 | 2 | The -x option sets the maximum password age until the password needs to be changed again. The -l option locks the account, and the other options do not exist. |
850 | 1 | The -l option sets the maximum amount of memory that can be locked. The -t option sets the maximum CPU time, and the -x and -b options do not exist. |
851 | 2 | The command shown to display the password file and pipe the output into cut will display the usernames from the password file, /etc/passwd. The /etc/shadow file would also produce the same output. |
852 | 2 | The access_times configuration item sets the times in which access is allowed. The other configuration options shown are not valid. |
853 | 1 | The .socket file extension is used for interprocess communication, network sockets, and first-in, first-out (FIFO) queues controlled by systemd. For more information, see systemd.socket. |
854 | 3 | The -N option provides the “new” passphrase, and when generating a key, it can be used to generate an empty password. The -p and -P options both work with passwords but would do so on an existing key. The -d option does not exist for ssh-keygen. |
855 | 1 | The MD5 algorithm has been used if the password in /etc/shadow begins with $1$. Of the other options, shadowed passwords beginning with $2a$ or $2y$ would indicate the Blowfish algorithm. There is no RIN or PIK algorithm for shadow passwords. |
856 | 2 | The --detach-sig option creates a detached signature file so that the original file remains unchanged. Both the original file and detached signature file are needed in order to verify the signature. The other options do not exist. |
857 | 3 | The server host key provides a means by which clients can verify that the server host key has not changed. |
858 | 2 | The IdentityFile option specifies the key that will be used to connect to the host. The other options do not exist for client configurations in SSH. |
859 | 3 | The gpg-agent command is a daemon process to manage private keys. The gpg program and other GnuPG-related utilities use gpg-agent. The other options shown for this question are not valid. |
860 | 4 | The sudoedit editor, part of the sudo package, can be used for the purpose described. Of the other commands, only nano is a real command, but it would also present the same possibility of shell escapes as vim would in this scenario. While there may be ways to prevent a shell escaping with both vim and nano, sudoedit is typically the preferred option. |
861 | 1 | The -l option changes the login name for a connection with ssh. Among the other options, only -a and -m exist and are not used for the purpose described. |
862 | 1 | The -l option for usermod changes the username. It is worth noting that the user’s home directory and mail spool file do not change and would need to manually be changed following the usermod command. The other options are not used for the purpose described. |
863 | 3 | The send-keys option followed by the name of the key sends the key to the key server specified by the key server option. This is a typical scenario for sending a locally generated public key to a public server for others to use. The other options do not exist. |
864 | 4 | The % is used to denote a group within /etc/sudoers and provides an excellent way to facilitate an administrative privileged group. |
865 | 4 | The fsize option is used within the limits.conf file to control the maximum size of a file that can be created by a user for whom the limit applies. |
866 | 2 | The ServerAliveCountMax option is used to set the number of keepalive messages that can be sent by the client but not responded to before the client will terminate the connection. |
867 | 3 | The /etc/nologin file prevents login when present and can also contain a message that is displayed to users when attempting to login. |
868 | 1 | The -t option specifies the lifetime for the key and is usually given in seconds but can also be given in minutes, hours, days, and weeks with qualifiers. The other options shown do not fulfill the scenario described. |
869 | 1 | The -R option sets up a remote forward so that remote users can also connect to the tunnel being set up. The other options are not valid for the remote forwarding scenario. |
870 | 2 | The -W option sets the number of days to warn a user before their password expires. The other options do not exist for chage. |
871 | 2 | The /etc/shadow- file contains the state of the shadow file before the last change and would likely be the first place to begin recovery. The next would likely be a backup, though /var/backups/ does not hold backups unless manually created. |
872 | 2 | Integration with the libwrap library is an indicator that a given service or daemon will be able to utilize TCP wrappers for access control. |
873 | 1 | The User_Alias option enables specification of a group of users for use elsewhere within the sudoers file. |
874 | 1 | Setting -P0 will allow no ping requests to precede the scan and is useful for the scenario described. There is an -s option, but it is not used for this purpose. The other options are not valid. |
875 | 3 | The UserKnownHostsFile configuration option enables specification of the location and filename for the known hosts file for users. |
876 | 3 | The -t argument sets the type of key to generate, and dsa creates a key with the dsa algorithm. Other types includes rsa and ecdsa. The files are normally placed in /etc/ssh and assigned names such as ssh_host_[algorithm]_key and ssh_host_[algorithm]_key.pub, where [algorithm] is one of rsa, dsa, ecdsa, or ed25519. |
877 | 3 | The -q option prints the users who are logged in along with a count of those users. The -l option prints the login processes, the -t option prints the last system time change, and the -e option does not exist. |
878 | 2 | The -u option unlocks an account while setting the password. The -l option locks the account, and the -t and -r options do not exist for the passwd command. |
879 | 3 | The maxlogins option is used to control the number of times that a user can log in. The only other limit-related option shown is maxsyslogins, which sets the maximum number of logins for the entire system. |
880 | 2 | The /proc filesystem stores information about running processes on the system. The /etc filesystem is used for configuration information, and /dev is used for device information. The /environment filesystem does not exist on a default Linux system. |
881 | 3 | The /etc/modprobe.d directory contains information related to the modprobe configuration. This can be overridden with the -C option on the command line. |
882 | 1 | The -g option to wall sends the input to the specified group. Answer B will send the output to all users, whereas answers C and D will not work. |
883 | 2 | The -e option to dmesg displays the time in a localtime and the delta in a format that is typically easier to work with. The -rel option does not exist. The -f option specifies the logging facility, and -t does not display time at all. |
884 | 2 | The init process is typically associated with the initial process ID of 1 to indicate that it is the process from which others are spawned. Killing PID 1 will typically and immediately halt the system. |
885 | 3 | The lspci command shows the PCI devices in the system, and the -k option shows the kernel driver being used by the given device. The lsusb command will not accomplish the task requested and the ls command with -pci will not display the correct information. There is no showpci command. |
886 | 3 | The --no-wall option will cause telinit to not send a wall command to logged-in users about the state change. The other options listed in this question do not exist. |
887 | 1 | The class/net hierarchy within /sys contains information on the network configuration for the computer. It is a symlink to the devices hierarchy, where the device will be listed by its address rather than the logical eth0 name. |
888 | 2 | The SIGTERM signal is the default signal sent with the systemctl kill command. |
889 | 4 | A logical location to begin troubleshooting is within the system BIOS to ensure that the drive is being detected by the computer. |
890 | 3 | The dbus-monitor program, which requires an X display, can be used to monitor dbus. The other programs and options listed for this question do not exist. |
891 | 1 | The udevd service is called systemd-udevd.service within a systemd environment. |
892 | 1 | The system can be scheduled to shut down at a certain time, and that time should be entered in 24-hour format, as shown in the answer. |
893 | 3 | The -s option changes the signal to be sent from its default of SIGTERM. The new signal must be one of the main signal types, such as SIGINT or SIGSTOP. |
894 | 4 | The list-unit-files command will show the files available, whereas --type=service will limit those files to the services, in the same way that chkconfig --list returns a list of services. |
895 | 1 | The -C option sets the location of the cache to be updated instead of the default /etc/ld.so.cache. The lowercase option, -c, changes the format of the cache, whereas -v sets verbose mode. The --f option does not exist. |
896 | 3 | The -P option to dpkg will purge a package from the system, including the configuration files associated with the package. The apt-cache clean command cleans the package cache but not an individual package, and the apt-get remove command removes a package but not the associated configuration files. |
897 | 3 | The deb-src prefix is used to indicate that a given repository contains source packages. The deb prefix in option A would indicate normal packages. The other options are not valid. |
898 | 2 | The -U option is used to upgrade a package. Adding -v for verbose and -h for hash marks will print additional information and progress, as requested by the problem. |
899 | 1 | The -y or --assumeyes option will do what it says: Assume that you will answer “yes” and therefore not prompt. The other options do not exist. |
900 | 1 | The exclude option within /etc/yum.conf is a space-separated list of packages that accepts wildcards and is a list of packages that cannot be installed or upgraded. The other options listed in this question do not exist. |
901 | 3 | The ldconfig command is used to work with the library cache, and the -p option prints the directories and libraries in the cache. The -C option tells ldconfig to use a different cache. The ldd command prints the library dependencies for a given command, but the options given don’t exist for ldd. |
902 | 4 | The baseurl option is used to set the URL and must be fully qualified, meaning that it must include the protocol, such as http:// or file://. |
903 | 2 | The apt-cache dump command will display a listing of the available packages and their respective dependencies. The other commands and options listed in this question do not exist. |
904 | 1 | The /boot directory almost certainly exists but has not been partitioned into its own space. The /boot partition would not be hidden from lsblk if it was indeed a separate partition. |
905 | 2 | The /var/cache hierarchy contains cached data for both package management tools— in the case of yum, in /var/cache/yum, and in the case of a Debian-based system, in /var/cache/apt. |
906 | 1 | The master boot record (MBR) is the typical location for the boot loader to be stored on a BIOS-based system. |
907 | 4 | The / filesystem is the root filesystem. If separate partitions have not been created, the / filesystem will be the beginning of the hierarchy and will contain all other directories in the same partition. |
908 | 1 | The --output option configures the location for output of the command instead of STDOUT. |
909 | 1 | The dd command is used for this purpose, and for this case it takes an input file with the if option and an output destination with the of option. The bs option signals that the block size for writing should be 1 megabyte. |
910 | 4 | The history command displays history from the current session and can be used for the purpose described. The .bash_history file is written on session close, by default. |
911 | 3 | The --boot-directory option will install the boot images into the directory specified. This might be helpful for nonstandard installs or at times when you need to mount the boot partition separately. The other options listed in this question do not exist. |
912 | 1 | The update-grub command should be executed in order to make changes take effect in the menu and when changes have been made to the GRUB configuration. The other commands listed in this question do not exist. |
913 | 2 | The export command is used for this purpose and accepts a name=value pair, as shown in the answer. The other commands are not valid with the exception of the echo command, which will simply echo the argument to the console. |
914 | 3 | The HISTFILESIZE option configures the number of commands to keep in the history file. The other variables are not valid within Bash. |
915 | 4 | The -b option configures the body numbering format for nl, which by default will not number blank lines. The a format option will number all lines, including blanks. The -a option is not valid for the nl command, and the -n option configures the numbering format and would require an additional argument in order to be valid. |
916 | 4 | The od command is used to create octal output. The cat command will show the file as it exists on disk. The other two commands are not valid. |
917 | 1 | The pr command formats text for printing, including the date and page numbers at the top of each page. Adding the -d option causes the output to be double-spaced. The cat command will display output but not paginated in such a way. The other two commands are not valid. |
918 | 1 | The -n option is used to change the number of lines. Adding the +N after the -n option begins the tail process at the Nth line within the file. |
919 | 3 | The -i option causes the unique test to be done while ignoring the case of the element to be matched. |
920 | 3 | The awk command shown can be used for this purpose. The -F option sets the field separator, and the OFS option sets the output field separator. |
921 | 3 | The -a option is equivalent to the -d and -R options, which preserve links and copy recursively, respectively. The -b option creates a backup, and -f forces the copy. |
922 | 1 | When in command mode, typing a number followed by an uppercase G will immediately move the cursor to that line number. The /23 option will search for the number 23 in the file. The i23 option will insert the number 23, and finally ZZ will exit Vi. |
923 | 1 | The -d option changes the update interval and can be helpful on a busy system where top may be affecting performance. The -n option sets the number of iterations to run. There is no -t or -f option for top. |
924 | 2 | The ps -e command is used to display all processes, and the -o option configures the columns to display. |
925 | 1 | The grep command will be used for this purpose. Note the difference between grep -r and grep -ri. The question did not ask for case insensitivity, and therefore the use of -i in option B makes it incorrect. |
926 | 2 | The find command will be used for this purpose. Setting the directory from which to begin the find is required, along with the expression, which in this case, are files beginning with DB. |
927 | 2 | Load average information is gathered from /proc/loadavg, whereas uptime information is stored on /proc/uptime. |
928 | 4 | Interactive repair is the default, so no option is required. The -f option forces the operation, and -y and -a are both variations of noninteractive repair. |
929 | 4 | The /etc/mtab file is updated dynamically as filesystems are mounted and unmounted. The /etc/fstab file is not dynamically updated. |
930 | 2 | The -B option changes the format, and T sets the scale to terabytes. The -T option alone prints the filesystem type. The other options do not exist. |
931 | 1 | The e2image program can be used to create an image of metadata that can help with drive recovery. The resulting image file can be used with programs like dumpe2fs and debugfs. |
932 | 3 | The -c option checks for bad blocks. The -b option sets the block size. There is no -a or -d option. |
933 | 2 | The chown command is used for this purpose and can be used to set both the user and group for ownership. |
934 | 1 | The ssh-keyscan command can be used for the purpose described and can help with virtual machine deployment by obtaining the SSH host key and adding it to the known_hosts file. |
935 | 3 | The GRUB_RECORDFAIL_TIMEOUT option is used to configure the behavior of the system in the event of a failed boot. Setting the value to -1 will display the GRUB menu and not continue booting. Setting the value to 0 will cause the menu to not display. Setting to a value greater than or equal to 1 will cause the menu to display for that many seconds. |
936 | 1 | The -s option displays a summary, and -h displays it in a human-readable format. |
937 | 4 | The -L option tells find to follow symlinks. The -H and -P options are both variations to tell find not to follow symlinks, and the -S option does not exist. |
938 | 1 | The -a option appends to the file rather than overwriting when using tee. The other options do not fulfill the needs of the problem statement. |
939 | 3 | The /etc directory and its subdirectories typically contain configuration files that would be necessary in order to re-create the system in a restoration scenario. The /var directory usually contains variable information, whereas /opt may be used for several other purposes. The /bin directory contains binaries that can usually be reinstalled. |
940 | 1 | The /etc/hosts.deny file is part of TCP wrappers along with /etc/hosts.allow. Both provide a basic mechanism for configuration of access from remote hosts to network services. |
941 | 3 | The alias command uses the alias name followed by an equal sign followed by the command to be aliased. In this case, because the command to be aliased contains spaces, it needs to be contained in quotation marks. |
942 | 3 | Shell scripting syntax uses the format shown, with square brackets around the condition to the tested and double-equal signs for a string test. Variables are preceded by a dollar sign as shown. |
943 | 1 | The export command is necessary so that any variables that are manually defined in your current session become available to child processes. The source command executes the file and can be used for the purpose described but requires an additional argument. The let and def commands are not valid. |
944 | 3 | The source command is the functional equivalent of a single dot (.). The set command exists but is not used for this purpose. The other commands are not valid. |
945 | 1 | The syntax for setting the PATH separates the new path with a colon, as shown in the correct option. A primary difference between the correct and incorrect options for this question was in how the actual specified path was shown. |
946 | 1 | The correct syntax is as shown. Note that a semicolon is required when the commands are included on one line, as displayed in the answer. |
947 | 3 | The mail command with -s for the subject is necessary, followed by the email address for the mail. Then, input is redirected to the mail command using /etc/hostname. |
948 | 3 | The /etc/skel directory contains files that are a skeleton of a user’s home directory when their account is created. The other directories listed do not exist by default. |
949 | 4 | The Universal Access section, which can be found by typing Universal Access from within an Ubuntu GUI interface, enables configuration of accessibility options. |
950 | 2 | The kbdrate command is used for the purpose described and can help with accessibility. The other commands shown are not valid. |
951 | 1 | The DISPLAY variable controls the destination and screen for displaying GUI applications. Setting this variable facilitates forwarding of X applications over ssh. |
952 | 2 | The xhost command is used to control who can make connections for both users and hosts to a given X server. The other commands are not valid. |
953 | 2 | The -f option sets the days between expiration and disabled for an account. The -g option is used to set the group ID, whereas -e is used to set the overall expiration date. |
954 | 1 | The getent command can be used for the purpose described and will display the aliases on the server by examining the aliases database. The other commands are not valid and, in the case of the mail command shown, will simply attempt to send mail to an address known as aliases. |
955 | 3 | The ALL: ALL syntax will cause all hosts to be denied. This means that you must explicitly authorize hosts and networks using /etc/hosts.allow. |
956 | 2 | The current at jobs for all users are shown when atq is executed as superuser. |
957 | 3 | The -r option to the crontab command removes all cron entries for a given user. The -l option lists cron jobs, whereas the -e option edits the crontab. There is no -d option. |
958 | 1 | The -u option specifies the user. The -l option lists the cron jobs and -e edits them. There is no -d or -m option. |
959 | 1 | The userdel command, given no other options, does not delete the home directory. When given the -r option, the command will delete the home directory and mail spool file. There is no -h or -p option for the userdel command. |
960 | 4 | The -gid option is used to specify group ownership for the find command. The -group option does exist, but since the question specified that the group had already been deleted, the gid must be used instead. There is a -name option, but it searches by name and not group ID. |
961 | 2 | The groupmod command will be used for this purpose, and the -n option followed by the new group name is used to change the name. There is no groupchg command. |
962 | 4 | The journalctl command is used to view and parse log file entries on systemd-based systems that maintain logs in a special format. The logger command can be used to create log entries, and the other commands shown do not exist. |
963 | 1 | The -o option followed by either 1 or 2 enables ntpdate compatibility with older NTP servers. The default, when no -o option is specified, is version 3. The -v option tells ntpdate to be verbose, whereas the -e option sets the authentication timeout. |
964 | 4 | The /var/log/journal directory is used to store journal log files for systemd-based systems. The other directories do not exist by default. |
965 | 3 | The -m option sets the mail program to use when mailing logs. It is set to /usr/bin/mail -s by default. There is no -o option, and -v is verbose. The -s option to the logrotate command sets the state file to use. |
966 | 1 | The -u option configures the output to UTC regardless of the time zone. The -s option sets the time, and there is no -v or -t option. |
967 | 4 | The lprm command is used to remove print jobs on a system that uses the lp system for printing. There is no lpdel or rmprint command. There is an rm command, but it’s not used for working with print queues. |
968 | 4 | The 255.255.254.0 subnet mask is equivalent to /23. The 255.255.255.0 subnet mask is /24. The subnet mask 255.255.255.255 is /32, and 255.255.0.0 is /16. |
969 | 1 | The /etc/hosts file will be examined first, and then a Domain Name System (DNS) query will be sent based on the configuration shown. |
970 | 4 | Standard LDAP traffic is TCP port 389 on the server. TCP port 25 is SMTP, 443 is HTTPS, and 143 is IMAP. |
971 | 3 | The -l option to ssh changes the username sent for authentication. This can be useful for scripting scenarios where the @ notation cannot be used. The -v option is verbose mode, and -i is the identity file to use. There is no -u option. |
972 | 4 | The -n option disables name resolution for addresses involved in the ping request/reply. The -D option returns a time stamp, whereas -d sets the SO_DEBUG option. Finally, -f is a flood ping. |
973 | 1 | The ifconfig command shows various statistics about the interfaces on a Linux system, including whether the interface is up or down, its packets and bytes, queue length, and other information. The other commands listed do not exist. |
974 | 3 | The -C option shows the SOA for each of the DNS name servers listed as authoritative for the domain. The -a option sends an ANY query, whereas -N sets the number of dots for the domain to be considered absolute. There is no -n option. |
975 | 1 | The entire 127.0.0.0/8 range is available for local host addresses. Therefore, an answer would need to be in this range. The proper format for /etc/hosts is IP address followed by name, followed by optional aliases, which makes option A correct. |
976 | 3 | The --ignore-errors option tells ifup to continue even if there are otherwise fatal errors. The -h option outputs help. There is no -C or --continue option. |
977 | 3 | The -u option unlocks an account that was locked using the -l option. The -w option sets the warn days, and -S prints the status. |
978 | 3 | When connecting to an alternate port, you can use the -p option to set the port or use a colon to separate the host from the port. |
979 | 2 | The mailto configuration option sets the destination for emails related to sudo. The other options listed are not valid for sudo. |
980 | 2 | The who command displays who is currently logged in and the date and time they logged in. The whois command displays information about domains. The other commands are not valid. |
981 | 3 | Port 123 is used for NTP communication by default. Port 161 is SNMP, 139 is NetBIOS, and 194 is IRC. |
982 | 4 | A UDP scan can be initiated with -sU. A scan of -sT is a normal TCP scan, and -sS is a SYN scan. There is no -sP option. |
983 | 2 | The +D option is used to search an entire directory tree for files that are open by processes. The -d option does essentially the same thing but does not go into subdirectories. The -f option is typically used in combination with other options to control path name interpretation. The -i option lists files or processes with open ports. |
984 | 3 | The -r option causes the ip command to attempt to resolve IP addresses. The -f option specifies the protocol family. There is no -n or -a option to the ip command. |
985 | 1 | The ss command will be used, and when given the -o option, timer information is displayed. The netstat -rn command shows route information but not sockets or timing, and ping -f is a flood ping and not related. The ls -l command displays files in a long listing format. |
986 | 3 | All of the addresses shown are in private ranges. The only one with the correct netmask is 255.255.255.0, which is equivalent to 24 masked bits. |
987 | 3 | The !H sequence indicates host unreachable. Network unreachable is !N. |
988 | 4 | There is no port for ICMP. The protocol itself does not use ports. |
989 | 2 | The /etc/services file contains the port number to name translation for a given server. The file contains well-known ports and can be customized on a per-server basis. |
990 | 1 | The command shown launches speech output for Orca. The other commands contain options that are invalid and thus will not work. |
991 | 1 | The configuration files can be found in the /etc/lightdm hierarchy or in /usr/share/ lightdm. The other directory locations do not exist by default. |
992 | 4 | The xwininfo command is used to gather information about windows. The other commands shown are not valid. |
993 | 1 | The tzconfig command can be used on a Debian system to set the time zone. The other commands listed do not exist. |
994 | 3 | The locale command will be used for this purpose, and the -m option displays the available character maps. There is no charmap or mapinfo command. |
995 | 2 | Time zone information is found within the /usr/share/zoneinfo hierarchy. The other directories listed do not typically exist by default. |
996 | 1 | The default location on a Red Hat system is /var/lib/ntp/drift. The other locations shown do not exist by default. Within /etc/ntpd.conf, the location of the drift file can be changed with the driftfile option. |
997 | 3 | The <<< character combination reads input from STDIN or standard input and uses it as the body of the message for the mail command. |
998 | 3 | The groupdel command is used to remove a group from a system. No members of the group can remain or the command will fail. |
999 | 3 | The lpr syslog facility sends messages from the lp subsystem to syslog. The auth facility is used for security-related messages. The other listed options are not syslog facilities. |