Domain 1 Flashcards
System Management (96 cards)
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.