Domain 1 Flashcards
System Management
Which command is used to load a module and its dependencies automatically?
modprobe lsmod insmod rmmod
A. 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.
Which option given at boot time within the GRUB2 boot entry configuration will boot the system into single-user mode?
single-user su single root
C. The keyword single given on the Linux kernel command line will boot the system into single-user mode. The other options are not valid.
What is the command to display the default target on a computer running systemd?
systemctl defaults update-rc.d defaults systemctl runlevel systemctl get-default
D. The systemctl get-default command will show the default target. The other commands and options are not valid.
Which command is used to obtain a list of USB devices?
usb-list lsusb ls-usb ls --usb
B. The lsusb command is used to obtain a basic list of USB devices on a system. This can be helpful when preparing a USB device with a boot image, such as when you need to boot the system from USB. The other commands are not valid. In the case of option D, the ls command is valid, but there is no –usb option.
Which command can be used to obtain a list of currently loaded kernel modules?
insmod modlist ls ––modules lsmod
D. The lsmod command is used to list currently loaded kernel modules, thereby 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.
When running with a Unified Extensible Firmware Interface (UEFI) system, to which partition will the EFI system partition typically be mounted?
/etc/efi /efi /sys/efi /boot/efi
D. The ESP is typically mounted at /boot/efi.
Assuming that a USB disk contains a single partition and is made available on /dev/sdb, which command mounts the disk in /media/usb?
mount /dev/sdb1 /media/usb usbconnect /dev/sdb0 /media/usb mount /dev/sdb0 /media/usb usbmount /dev/sdb1 /media/usb
A. The mount command is used to mount drives in Linux. The source and destination mount point are expected as arguments. Drive partitions begin at number 1, making the first partition number 1.
What is one reason a device driver does not appear in the output of lsmod, even though the device is loaded and working properly?
The use of systemd means drivers are not required for most devices. The use of an initrd.img means support is enabled by default. The system does not need a driver for the device. Support for the device has been compiled directly into the kernel.
D. If a working device does not appear in lsmod, it typically means 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 an initrd.img (option B) would have no effect.
Which option to rmmod will cause the module to wait until it’s no longer in use to unload the module?
-test -b -w -unload
C. The -w option causes the module to wait until it’s no longer needed prior to unloading. The other options are not valid for rmmod.
Which command will output a new GRUB configuration file and send the output to the correct location for booting?
update-grub update-grub boot > /boot/grub.cfg grub-rc.d grub-boot
A. The update-grub is an alias or shortcut for the grub-mkconfig -o /boot/grub/grub.cfg command. On some variants of Linux, the update-grub command is known as grub2-update. The other options are not valid for this purpose. Options C and D are not valid commands, while option B contains invalid options and an invalid location for the destination file.
What is the maximum number of primary partitions available on an MBR partitioning system?
Two Four One Five
B. MBR-based disks can be partitioned with up to four primary partitions, one of which can be further partitioned or extended into logical partitions.
When working with disk partitions through a tool like fdisk, you see the type 0x82. Which type of partition is this?
Linux Linux swap NTFS FAT
B. 0x82 is Linux swap, while 0x83 is Linux. NTFS is 0x07, and FAT is 0.0c.
Which file should you edit when using GRUB2 in order to define or set options like the timeout?
/etc/default/grub /etc/grub/boot /etc/boot/grub.d /grub.d/boot
A. 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.
Which option for the grub2-mkconfig command sends output to a file instead of STDOUT?
-stdout --fileout -o -f
C. The -o option can be used to specify a destination file to which output will be sent instead of to STDOUT. The other options listed in this question do not exist.
Of the following choices, which size would be most appropriate for the /boot partition of a Linux system?
At least 1 GB. Between 100 MB and 200 MB. /boot should not be partitioned separately. Less than 5 MB.
A. The recommended /boot partition size has increased and it is now recommended to be at least 1 GB. The used space within /boot will increase as more kernels are added, such as during an upgrade process. The size should not be set too small because upgrade processes can fail if the partition becomes full.
Which of the following commands initializes a physical disk partition for use with LVM?
lvmcreate pvcreate vgextend pvs
B. The pvcreate command initializes a physical partition for future use as a logical volume with LVM. The pvs command displays information about physical volumes but is not used to initialize the physical disk partition. The vgextend command is valid but not for the scenario provided. The lvmcreate command does not exist.
Which of the following commands installs GRUB into the MBR of the second SATA disk?
grub2-install /dev/hdb2 grub2-install /dev/sda2 grub2-config /dev/sda grub2-install /dev/sdb
D. The grub2-install command is used to install GRUB onto a disk. The second SATA disk would be /dev/sdb, therefore making option D the correct answer.
Which command is used to create a logical volume with LVM?
pvcreate lvmcreate lvcreate volcreate
C. 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.
What is the logical order for creation of an LVM logical volume?
Physical volume creation, volume group creation, logical volume creation Physical volume creation, logical volume creation, volume group creation Logical volume creation, physical volume creation, volume group creation LVM creation, format, partition
A. Physical volumes are initialized first, followed by volume group creation, and then logical volume creation.
Which command should be run after making a change to the /etc/default/grub file?
grub grub-mkconfig grub-inst reboot
B. 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).
Which command is used to change details of a logical volume?
lvmcreate pvcreate lvchange lvmscan
C. The lvchange command configures details about a logical volume, including whether that volume appears to be available.
A hard drive is reported as hd(0,0) by the GRUB Legacy configuration file. To which of the following disks and partitions does this correspond?
/dev/hdb2 /dev/hda0 /dev/disk1 /dev/sda1
D. GRUB Legacy begins counting at 0 and separates the disk letter and partition with a comma, therefore 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.
Which of the following commands installs GRUB into the master boot record (MBR) of the first SATA drive?
grub-install /dev/hda grub-install /dev/sda grub-install /dev/hd0,0 grub -i /dev/hda
B. The command to install GRUB is grub-install, and the first SATA drive is /dev/sda. A device listed as hda is typically a PATA drive, thereby making those options incorrect.
Which option given to a yum command will install a given package?
update configure install get
C. The yum install command will install a given package. The update option will update a package. The other options listed do not exist.
After a new hard drive is inserted into the system, what is the correct order to make the drive ready for use within Linux?
Use fdisk to create partitions, and then mount the partitions. Mount the partitions. Use fdisk to create partitions and mount -a to mount all the newly created partitions. Use fdisk to create partitions, then format the partitions using a command such as mkfs, and then mount the partitions.
D. The first step is to use fdisk to create one or more partitions. Then format the partitions, and then mount the partitions for use. Various filesystem types can be created with mkfs and its subcommands. These filesystem types include ext3, ext4, xfs, and ntfs.
When working with an rpm package file and using rpm2cpio, by default the output is sent to which location?
STDOUT The file cpio.out The file a.out The file /tmp/cpi.out
A. rpm2cpio sends its output to STDOUT by default, and therefore that output needs to be redirected to a file in most cases.
Which of the following describes a primary difference between ext2 and ext3 filesystems?
ext3 was primarily a bug-fix update to ext2. ext3 includes journaling for the filesystem. ext3 completely changed the tools needed for management of the disks. ext3 has no significant differences.
B. The addition of journaling in ext3 increased filesystem reliability and performance.
According to the Filesystem Hierarchy Standard (FHS), what is the correct location for add-on application software packages?
/etc /var /tmp /opt
D. The /opt hierarchy is used for add-on application software packages. The /etc hierarchy is configuration information, while /var is also data files but variable files such as mail files. The /tmp directory is for temporary files. Because each path begins with a /, it is considered an absolute path.
Which option to the mount command will mount all filesystems that are currently available in /etc/fstab?
-f -d -a -m
C. The -a option mounts all filesystems in /etc/fstab that are currently available. Of the other options listed, only the -f option is available, and it is a shortcut to the “fake” option, which does not do anything except perform a dry run of the mount.
Which option of the systemctl command will change a service so that it runs on the next boot of the system?
enable startonboot loadonboot start
A. The enable option configures the service to start on boot. The start option, option D, is used to start a service immediately. The other options are not valid for this command.
Which option to xfs_metadump displays a progress indicator?
-g -p -f -v
A. The -g option displays progress of the dump. The other options listed do not exist.
The system is running out of disk space within the home directory partition, and quotas have not been enabled. Which command can you use to determine the directories that might contain large files?
du df ls locate
A. The du command will report on disk usage for the specified directory in a recursive manner, unlike the other commands shown here.
Which file contains information about the filesystems to mount, their partitions, and the options that should be used to mount them?
/etc/filesystems /etc/mounts /etc/fstab systemd.mount
C. The /etc/fstab file is used to store information about the filesystems to mount within the system. The systemd.mount option refers to the configuration files used by systemd related to filesystems.
According to the FHS, what is the proper mount point for removable media?
/etc /srv /tmp /media
D. The /media mount point is used for removable media. See https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html for more information on the FHS.
How many SCSI devices are supported per bus?
7 to 15 2 to 4 12 4
A. SCSI supports 7 to 15 devices per bus, depending on the type of SCSI. The lsscsi command displays device information.
Which option to umount will cause the command to attempt to remount the filesystem in read-only mode if the unmounting process fails?
-o -r -f -v
B. 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.
Which of the following represents the correct format for the /etc/fstab file?
<directory> <device> <type> <options> <device> <type> <options> <device> <type> <options> <directory> <dump> <fsck> <device> <directory> <type> <options> <dump> <fsck>
D. The proper order is the device (UUID or partition) followed by the directory to mount that device, followed by its type and options, and then the dump and fsck settings.
Which of the following commands is used to identify the UUID for partitions?
blkid partprobe find cat
A. The blkid command will show partition UUIDs. You can also get this information with the lsblk -no +UUID <partition> command. The partprobe command is used to update the partition table at the kernel level. The other commands shown in this question do not accomplish the required task.</partition>