Domain 1 Flashcards

System Management

1
Q

Which command is used to load a module and its dependencies automatically?

modprobe
lsmod
insmod
rmmod
A

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.

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

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
A

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.

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

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
A

D. The systemctl get-default command will show the default target. The other commands and options are not valid.

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

Which command is used to obtain a list of USB devices?

usb-list
lsusb
ls-usb
ls --usb
A

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.

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

Which command can be used to obtain a list of currently loaded kernel modules?

insmod
modlist
ls ––modules
lsmod
A

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.

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

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
A

D. The ESP is typically mounted at /boot/efi.

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

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

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.

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

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.
A

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.

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

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
A

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.

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

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

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.

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

What is the maximum number of primary partitions available on an MBR partitioning system?

Two
Four
One
Five
A

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.

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

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
A

B. 0x82 is Linux swap, while 0x83 is Linux. NTFS is 0x07, and FAT is 0.0c.

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

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

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.

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

Which option for the grub2-mkconfig command sends output to a file instead of STDOUT?

-stdout
--fileout
-o
-f
A

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.

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

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

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.

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

Which of the following commands initializes a physical disk partition for use with LVM?

lvmcreate
pvcreate
vgextend
pvs
A

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.

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

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
A

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.

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

Which command is used to create a logical volume with LVM?

pvcreate
lvmcreate
lvcreate
volcreate
A

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.

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

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

A. Physical volumes are initialized first, followed by volume group creation, and then logical volume creation.

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

Which command should be run after making a change to the /etc/default/grub file?

grub
grub-mkconfig
grub-inst
reboot
A

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).

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

Which command is used to change details of a logical volume?

lvmcreate
pvcreate
lvchange
lvmscan
A

C. The lvchange command configures details about a logical volume, including whether that volume appears to be available.

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

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
A

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.

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

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
A

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.

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

Which option given to a yum command will install a given package?

update
configure
install
get
A

C. The yum install command will install a given package. The update option will update a package. The other options listed do not exist.

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

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.
A

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.

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

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

A. rpm2cpio sends its output to STDOUT by default, and therefore that output needs to be redirected to a file in most cases.

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

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.
A

B. The addition of journaling in ext3 increased filesystem reliability and performance.

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

According to the Filesystem Hierarchy Standard (FHS), what is the correct location for add-on application software packages?

/etc
/var
/tmp
/opt
A

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.

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

Which option to the mount command will mount all filesystems that are currently available in /etc/fstab?

-f
-d
-a
-m
A

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.

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

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

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.

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

Which option to xfs_metadump displays a progress indicator?

-g
-p
-f
-v
A

A. The -g option displays progress of the dump. The other options listed do not exist.

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

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

A. The du command will report on disk usage for the specified directory in a recursive manner, unlike the other commands shown here.

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

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
A

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.

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

According to the FHS, what is the proper mount point for removable media?

/etc
/srv
/tmp
/media
A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

How many SCSI devices are supported per bus?

7 to 15
2 to 4
12
4
A

A. SCSI supports 7 to 15 devices per bus, depending on the type of SCSI. The lsscsi command displays device information.

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

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
A

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.

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

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>
A

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.

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

Which of the following commands is used to identify the UUID for partitions?

blkid
partprobe
find
cat
A

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>

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

The xfs_info command is functionally equivalent to which command and option?

xfs_test -n
xfs_list
tunexfs -i
xfs_growfs -n
A

D. The xfs_info command is equivalent to xfs_growfs -n.

39
Q

Which of the following commands will create a btrfs filesystem on the first SATA drive?

mkfs /dev/sda1
mkfs.btrfs /dev/sda
mkfs.btr2fs /dev/sda1
mkfs –b /dev/sda
A

B. The mkfs.btrfs command is used to create btrfs filesystems on block storage and does not require the drive to be partitioned.

40
Q

Which command and option can be used to determine whether a given service is currently loaded?

systemctl ––ls
telinit
systemctl status
sysctl -a
A

C. Out of the options given, the systemctl status command and option are the most appropriate. The telinit and sysctl commands are not used for this purpose. Likewise, the –ls option is not valid for systemctl.

41
Q

Which command can be used to change the partitioning scheme for a disk, such as to change the size of existing partitions without deleting them?

resize2fs
parted
mkfs
rfdisk
A

B. The parted command can be used to resize partitions in such a way. The mkfs command is not used for this purpose, and the other two options do not exist.

42
Q

Which of the following commands will mount a USB device at /dev/sdb1 into the /mnt/usb directory, assuming a VFAT filesystem for the USB drive?

mount -t vfat /dev/sdb1 /mnt
usbmount /dev/sdb1 /mnt/usb
mount -t vfat /dev/sdb1 /mnt/usb
mount -t usb /dev/sdb1 /mnt/usb
A

C. The VFAT filesystem is known as vfat to the mount command, and the other elements of the mount command are standard.

43
Q

Which option within gdisk will change the partition name?

n
b
v
c
A

D. The c option in gdisk is used to change the partition name. The n option creates a new partition, the v option verifies the disk, and the b option creates a backup of GUID Partition Table (GPT) data to a file.

44
Q

Which command on a systemd-controlled system would place the system into single-user mode?

systemctl stop
systemctl isolate rescue.target
systemctl single-user
systemctl runlevel one
A

B. The isolate option is used to move the system into the target specified, thereby making option B the correct one. The stop option stops a service. The other options do not exist.

45
Q

Which options to fsck can be used to check all filesystems listed in /etc/fstab while excluding the root partition?

-NR
-AR
-X
-C
A

B. The -A option checks all filesystems in /etc/fstab, while the -R option excludes the root filesystem.

46
Q

Which option in /etc/fstab sets the order in which the device is checked at boot time?

options
dump
fsck
checkorder
A

C. The fsck option, which is represented as a number in the /etc/fstab file, sets the order in which the device is checked at boot time.

47
Q

Which file is used to indicate the local time zone on a Linux server?

/etc/timez
/etc/timezoneconfig
/etc/timezone
/etc/localtz
A

C. The file /etc/timezone is used to indicate the local time zone. The other files listed as options do not exist.

48
Q

Within which directory will you find files related to the time zone for various regions?

/etc/timezoneinfo
/etc/zoneinfo
/var/zoneinfo
/usr/share/zoneinfo
A

D. 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.

49
Q

Which option best describes the following, gathered with the ls -la command?

lrwxrwxrwx. 1 root root 35 Jul 8 2014
.fetchmailrc -> .configs/fetchmail/.fetchmailrc

A - It is a file called .fetchmailrc that is linked using a symbolic link.
B - It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.
C - It is a directory called .fetchmailrc that is owned by user Jul.
D - It is a local directory called .configs/fetchmail/.fetchmailrc.

A

A. The listing shows a symbolic linked file created with the ln command 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.

50
Q

Which environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted clock?

LOCALE_DATE
DATE_FORMAT
LC_TIME
LC_DATE
A

C. 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.

51
Q

Which of the following encodings provides a multibyte representation of characters?

ISO-8859
UTF-8
ISO-L
UFTMulti
A

B. 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 answers are not valid.

52
Q

Which command can be used to view the available time zones on a system?

tzd
/etc/locale
timedatectl
tzsel
A

C. The timedatectl command includes a list-timezones subcommand to show known time zones. The tzsel command does not exist, but there is a similar command called tzselect that 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.

53
Q

Which option to lspci is used to display both numeric codes and device names?

-numdev
-n
-nn
-devnum
A

C. The -nn option displays both numbers and device names, thus making option C correct. The -n option (option B) displays only numbers. The other two options do not exist.

54
Q

Which of the following values for the LANG variable will configure the system to bypass locale translations where possible?

LANG=COMPAT
LANG=NONE
LANG=C
LANG=END
A

C. Setting LANG=C is an alias for POSIX compatibility and will cause programs to bypass locale translations. The other options shown for LANG are not valid.

55
Q

If you need to temporarily reconfigure all locale variables and settings for a given session, which environment variable can be used?

LC_LIST
LC_GLOBAL
LC_ALL
ALL_LOCALE
A

C. The LC_ALL variable can be used to set environment variables such as the 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.

56
Q

Which of the following commands will set the systemwide time zone to ‘America/Los_Angeles’?

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
ln -sf America/Los_Angeles ; /etc/localtime
ln -sd /etc/localtime /usr/share/timezone/America/Los_Angeles
ln -sf /etc/localtime /usr/share/zoneinfo/America/Los_Angeles
A

A. The ln command is used for this purpose, and the -s option creates a symbolic or soft link, while -f forces or overwrites the destination. The other options and order of commands are not valid.

57
Q

Which locale-related variable is used for currency-related localization?

LC_MONE
LC_CURRENCY
LC_MONETARY
LC_CURR
A

C. The LC_MONETARY variable is used by certain programs to determine the localization for currency.

58
Q

Which command is used to query and work with the hardware clock on the system?

hwc
ntpdate
systime
hwclock
A

D. 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.

59
Q

Which option to the date command can be used to set the date and time?

date -f
date -t
date --change
date -s
A

D. 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 or chrony is running, one of those processes may alter the date even after it has been set with date -s.

60
Q

Which function of the hwclock command will set the hardware or BIOS clock to the current system time?

-w
-s
-a
-m
A

A. 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.

61
Q

Which of the following commands sets the hardware or BIOS clock to UTC based on the current system time?

hwclock --systohc --utc
hwclock --systohc --localtime
hwclock --systohc
hwclock --systoutc
A

A. –systohc 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 be local time instead. Therefore, the best option is A.

62
Q

Which of the following commands shows the current default route without performing DNS lookups on the IP address(es) involved?

netstat -rn
netstat -n
netstat -r
netstat -f
A

A. 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.

63
Q

A Serial ATA (SATA) disk will use which of the following identifiers?

/dev/hdX
/dev/sataX
/dev/sdX
/disk/sataX
A

C. SATA disks are addressed as /dev/sdX, just like a SCSI disk. /dev/hdX is a traditional ATA disk. The other options do not exist.

64
Q

Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?

route add default gateway 192.168.1.1 eth0
eth0 --dg 192.168.1.1
route add default gw 192.168.1.1 eth0
route define eth0 192.168.1.1
A

C. 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 address of the gateway and the adapter.

65
Q

Which option for the host command will query for the authoritative name servers for a given domain?

-t ns
-t all
-ns
-named
A

A. 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.

66
Q

Which option for the ping command enables you to choose the interface from which the ICMP packets will be generated?

-i
-I
-t
-a
A

B. The -I option enables the choice of interface. A lowercase -i option sets the interval, while -a indicates an audible ping. Finally, -t enables a TTL-based ping only.

67
Q

Which of the following commands queries for the mail servers for the domain example.com?

dig example.com mx
dig example.com
host -t smtp example.com
dig example.com smtp
A

A. The host or dig command 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.

68
Q

Which of the following addresses represents the localhost in IPv6, such as you might find in /etc/hosts?

0:1
::1
127:0:1
:127:0:0:1
A

B. 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.

69
Q

Which command can be used to listen for netlink messages on a network?

ip monitor
netlink -a
ip netlink
route
A

A. 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.

70
Q

Which of the following configuration lines in /etc/nsswitch.conf causes a lookup for group information to first use local files and then use LDAP?

group: files ldap
lookup: group [local ldap]
group: [local ldap]
group: localfiles ldap
A

A. The syntax is database: <databasename> with additional database names separated by spaces, as shown in the correct option for this question.</databasename>

71
Q

Which of the following dig commands sends the query for example.com directly to the server at 192.168.2.5 rather than to a locally configured resolver?

dig example.com @192.168.2.5
dig -t 192.168.2.5 example.com
dig -s 192.168.2.5 example.com
dig server=192.168.2.5 example.com
A

A. 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 other options are not valid.

72
Q

Which of the following commands will enumerate the hosts database?

getent hosts
gethosts
nslookup
host
A

A. 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.

73
Q

Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/resolv.conf?

dns 192.168.1.4
dns-server 192.168.1.4
nameserver 192.168.1.4
name-server 192.168.1.4
A

C. The configuration option is nameserver, and the value for the option is the IP address of the desired name server. Several options affect how name resolution is performed, such as the number of attempts and timeout. See resolv.conf(5) for more information.

74
Q

Which of the following commands adds a route to the server for the network 192.168.51.0/24 through its gateway 192.168.22.1?

route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.22.1
route add -net 192.168.51/24 gw 192.168.22.51
route -net 192.168.51.0/24 192.168.22.1
route add 192.168.51.1 -n 192.168.22.0//255.255.255.0
A

A. 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 letters gw and the IP address of the gateway. The other options shown are invalid for a variety of reasons, including missing keywords and options and order.

75
Q

Which of the following commands shows network services or sockets that are currently listening along with sockets that are not listening?

netstat -a
netlink -a
sockets -f
opensock -l
A

A. The netstat command is used for this purpose, and the -a option displays all sockets, listening and non-listening. Note that it’s frequently helpful to add the -n option, or combine options as in netstat –an, in order to prevent name lookup. Doing so can significantly improve performance of the command.

76
Q

When partitioning a disk for a mail server running Postfix, which partition/mounted directory should be the largest in order to allow for mail storage?

/etc
/usr/bin
/mail
/var
A

D. 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.

77
Q

Which of the following commands will change the default gateway to 192.168.1.1 using eth0?

ip route default gw 192.168.1.1
ip route change default via 192.168.1.1 dev eth0
ip route default gw update 192.168.1.1
ip route update default 192.168.1.1 eth0
A

B. 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.

78
Q

Which of the following commands displays the Start of Authority information for the domain example.com?

dig example.com soa
dig example.com authority
dig example.com -auth
dig -t auth example.com
A

A. 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 saying that dig has ignored the invalid type of auth.

79
Q

Assume that you want to enable local client services to go to hosts on the network without needing to fully qualify the name by adding the domain for either example.com or example.org. Which option in /etc/resolv.conf will provide this functionality?

search
domain
local-domain
local-order
A

A. 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.

80
Q

Which of the following commands prevents traffic from reaching the host 192.168.1.3?

route add -host 192.168.1.3 reject
route -nullroute 192.168.1.3
route add -null 192.168.1.3
route add -block 192.168.1.3
A

A. 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 invalid because they use invalid options to the route command.

81
Q

Which of the following commands will emulate the ping command in Microsoft Windows, where the ping is sent for four packets and then the command exits?

ping -n 4
ping -t 4
ping -p 4
ping -c 4
A

D. The -c option provides the count of the number of pings to send. The -n option specifies numeric output only, while -p specifies the pattern to use for the packet content. Finally, the -t option sets the TTL.

82
Q

You need to prevent local clients from going to a certain host, www.example.com, and instead redirect them to localhost. Which of the following is a method to override DNS lookups for the specified host?

Add a firewall entry for the IP address of www.example.com to prevent traffic from passing through it.
Delete www.example.com from the route table using the route command.
Add a null route to prevent access to the IP address for www.example.com.
Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.
A

D. 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.

83
Q

Which of the following commands should be executed after running ip route change?

ip route flush cache
ip route reload
ip route cache reload
ip route restart
A

A. The ip route flush cache command should be executed after changing the routes. The other commands shown for this question are not valid.

84
Q

Which option should be used to send a DNS query for an SPF record with dig?

-t txt
-t spf
-t mx
-t mailspf
A

A. SPF records are stored in the txt record type in DNS, thereby making -t txt the correct option for this. Of the other answers, only -t mx is valid; it returns the mail exchangers for the given domain.

85
Q

When you’re viewing the available routes using the route command, one route contains flags UG while the others contain U. What does the letter G signify in the route table?

The G signifies that the route is good.
The G signifies that the route is unavailable.
The G signifies that this is a gateway.
The G signifies that the route is an aggregate.
A

C. The G signifies a gateway within the route table.

86
Q

Which of the following commands requests a zone transfer of example.org from the server at 192.168.1.4?

dig example.org @192.168.1.4 axfr
dig example.org @192.168.1.4
dig example.org @192.168.1.4 xfer
dig example.org #192.168.1.4 xfer
A

A. 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.

87
Q

Which yum option displays the dependencies for the package specified?

list
deplist
dependencies
listdeps
A

B. 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.

88
Q

Which of the following commands can be used to display the current disk utilization?

df
du
diskutil
diskuse
A

A. The df command displays information on disk usage and can help with planning disk utilization over time. For example, if you note that disk utilization is increasing significantly, preparations can be made to bring more disks online or even to change the log rotation schedule such that logs are rotated faster, thereby freeing up space.

89
Q

You are working with a legacy CentOS 5 system and need to re-create the initial RAM disk. Which of the following commands is used for this purpose?

mkinitrd
mkramdisk
mkdisk --init
mkfs.init
A

A. The mkinitrd command is used on older systems to create the initial RAM disk. The initial RAM disk is used to load (some might say preload) essential modules for things like disks and other vital components needed for booting.

90
Q

Which of the following commands is used to display the currently loaded modules on a running system?

ls -mod
lsmod
tree
mod --list
A

B. The lsmod command is used to display currently loaded modules. This is useful for scenarios where you are migrating from the stock or distribution-provided kernel to a custom kernel and need to know which modules to compile into the new kernel. Of the other commands, the tree command is valid but not for the scenario provided.

91
Q

Which of the following commands creates a list of modules and their dependencies?

lsmod
depmod
modlist
listmod
A

B. The depmod command is used to create a list of modules. The list is kept in a file called modules.dep, the location of which is dependent on the distribution of Linux in use.

92
Q

Which option to sysctl displays all values and their current settings?

-a
-b
-d
-c
A

A. The -a option displays all values and their current settings for sysctl. The -b option is binary and displays values without any newlines. The -d option is an alias for -h, which is help display. There is no -c option. The sysctl options can also be found in /etc/sysctl.conf.

93
Q

Which of the following commands installs a kernel module, including dependencies?

lsmod
modprobe
modinst
instmod
A

B. The modprobe command examines dependencies for a given module and loads both the dependencies and the requested module.

94
Q

Which command is used to determine the modules on which another module depends?

modinfo
modlist
modprobe
tracemod
A

A. The modinfo command provides information on a given kernel module. You can use modinfo to find out the parameters needed for a given module and the modules on which it depends, among other information. The modprobe command is used to load a module. There is no tracemod or modlist command.

95
Q
A