Linux set 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

search

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?

Shift

During boot of a system with GRUB2, which key can be pressed to display the GRUB menu?

-t

Part of the EXT tools, which option to the mke2fs command sets the type of filesystem to be created?

XML

The default format for an OVF template uses which document standard?

/boot/grub2/grub.cfg

The file /etc/grub2.cfg is typically a symbolic link to which file?

Support for the device has been compiled directly into the kernel.

What is one reason a device driver does not appear in the output of lsmod, even though the device is loaded and working properly?

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

What is the logical order for creation of an LVM logical volume?

shim.efi

When using UEFI, which of the following files can be used as a bootloader?

LC_MONETARY

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

active-backup

Which mode of network bonding is used for an active/passive configuration?

::1

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

It is a virtualization appliance file.

Which of the following best describes an OVA file?

/etc/modprobe.d

Within which of the following directories will you find blacklist information for modules loaded with modprobe?

kernel-install

Which command is used to install a kernel into the /boot directory, using the files from /usr/lib/kernel?

modprobe

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

hwclock

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

fstrim

Which command is used to remove unused filesystem blocks from thinly provisioned storage?

lvmdiskscan looks for physical volumes that have been initialized for use with LVM.

Which command is used to search for physical volumes for use with LVM?

lsblk

Which command prints device and partition information in a tree-like structure, including partition size and current mount status?

grub-mkconfig

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

update-grub > /boot/grub/grub.cfg

Which command will output a new GRUB2 configuration file and send the output to the correct location for booting?

dominfo

Which command within virsh obtains information about a domain?

-A

Which command-line option modifies the behavior of depmod such that only newer modules are added when comparing modules.dep?

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.

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

/etc/fstab is used to store information about the filesystems to mount within the system.

Which file contains information about the filesystems to mount, their partitions, and the options that should be used to mount them?

/etc/mtab

Which file contains information on currently mounted filesystems, including their mount options?

/proc/partitions

Which file contains the current list of partitions along with their major and minor numbers and number of blocks?

/etc/timezone

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

/etc/dhcpd.conf

Which file is used to maintain the configuration for DHCP?

/etc/crypttab

Which file is used to store a list of encrypted devices that are to be mounted at boot?

/etc/default/grub /boot/grub/grub.cfg, but this was not an option given for this question.

Which file should you edit when using GRUB2 in order to set things like the timeout?

-w option sets the hardware clock to the current system time.

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

Virtual filesystem

Which layer is used to enable client applications to work with disk devices in a standard way, regardless of disk architecture?

The /dev/ filesystem is used for storing device information for connected devices.

Which of the following best describes the /dev/ filesystem?

Master Boot Record (MBR)

Which of the following can be identified as an initial sector on a disk that stores information about the disk partitioning and operating system location?

Alphanumerics, minus, and dot

Which of the following characters are valid for hostnames in /etc/hosts?

route add default gw 192.168.1.1 eth0

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

route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1

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

df

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

efibootmgr -n

Which of the following commands changes the boot order for the next boot?

depmod

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

pvdisplay

Which of the following commands displays information about a given physical volume in an LVM setup?

multipath -l

Which of the following commands displays path information for LUNs?

dig example.com soa

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

pvcreate

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

insmod

Which of the following commands inserts a module into the running kernel but does not resolve dependencies?

grub2-install /dev/sda The second SATA disk would be /dev/sdb

Which of the following commands installs GRUB into the MBR of the second SATA disk?

grub-install /dev/sda 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

Which of the following commands installs GRUB into the master boot record (MBR) of the first SATA drive?

modprobe

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

localectl

Which of the following commands is used to change the keyboard layout settings?

lsmod

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

blkid

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

mount /dev/sda1 /boot

Which of the following commands mounts /dev/sda1 in the /boot partition?

route add -host 192.168.1.3 reject

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

dig example.com mx

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

dig example.org @192.168.1.4 axfr

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

--systohc will set the hardware clock according to the current system time

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

ip route flush cache

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

netstat -a

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

ss -m

Which of the following commands shows network sockets and their allocated memory?

-r option displays the current routes. The addition of -n prevents DNS lookups

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

ip route change default via 192.168.1.1 dev eth0

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

mkfs.btrfs command is used to create btrfs filesystems and does not require the drive to be partitioned.

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

ping -c 4

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?

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

Which of the following commands will enumerate the hosts database?

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

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

grub2-mkconfig --output=/boot/grub2/grub.cfg

Which of the following commands will send the output of the grub2-mkconfig command to the correct location for booting?

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime The ln command is used for this purpose, and the -s option creates a symbolic link, while -f forces or overwrites the destination.

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

bcfg

Which of the following commands, executed from within the UEFI shell, controls the boot configuration?

group: files ldap database: databasename with additional database names separated by spaces

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?

options debug

Which of the following configuration lines in /etc/resolv.conf enables debugging?

nameserver 192.168.1.4

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

vmlinuz is compressed, whereas vmlinux is not.

Which of the following describes a difference between vmlinuz and vmlinux?

ext3 includes journaling for the filesystem.

Which of the following describes a primary difference between ext2 and ext3 filesystems?

NAT uses the host adapter IP address for all network activity, while bridging enables the virtual machine to get its own IP.

Which of the following describes the difference between NAT and bridging in a virtualization environment?

Kickstart is used to script an installation, while anaconda is used to install the system.

Which of the following describes the relationship between anaconda and kickstart?

dig example.com @192.168.2.5

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?

/etc/sysconfig/network-scripts/

Which of the following directories contains configuration files related to networking?

UTF-8 provides multibyte character encoding

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

/proc/mounts

Which of the following files shows the currently mounted filesystems?

SFTP

Which of the following is not a valid option for booting when using kickstart?

143.236.32.231

Which of the following is not used as a private address for local, non-Internet, use?

/usr/lib/modules/{kernel-version}

Which of the following is the location in which kernel modules are stored?

The TZ environment variable

Which of the following lines added to .profile in a user's home directory will set their time zone to Central time?

balance-rr

Which of the following modes are used for load balancing in a bonding scenario on Linux?

--show-depends

Which of the following options to modprobe will show the dependencies for a module?

-z

Which of the following options to xfsdump sets the maximum size for files to be included in the dump?

ext3

Which of the following real filesystems can be resized using resize2fs?

192.168.1.4 cwa.braingia.org cwa IP address followed by canonical hostname followed by any aliases for the host

Which of the following represents a correct configuration line for /etc/hosts?

<device> <directory> <type> <options> <dump> <fsck>

Which of the following represents the correct format for the /etc/fstab file?

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.

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

1

Which of the following values to LIBVIRT_DEBUG is used to enable debug logging for libvirt?

virt-install

Which of the vmm (virt-manager) tools is used to install a virtual machine?

-o for output

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

-t ns

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

The -I option enables the choice of interface

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

single

Which option given at boot time within the GRUB configuration will boot the system into single-user mode?

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

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

-t txt

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

-b

Which option to dumpe2fs displays the bad blocks for a given partition?

--boot-directory

Which option to grub-install will place the GRUB images into an alternate directory?

--create

Which option to mdadm is used to create a new array?

--monitor

Which option to mdadm watches a RAID array for anomalies?

-r

Which option to modprobe will remove a module and attempt to remove any unused modules on which it depends?

-f

Which option to rmmod forces the module to be unloaded?

-w

Which option to rmmod will cause the module to wait until it's no longer in use to unload the module?

-a

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

-g

Which option to the blkid command purges the cache to remove devices that do not exist?

date -s

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

-b option prints known bad blocks

Which option to the dumpe2fs command can be used to display blocks that are reserved because of being marked as bad?

-a option mounts all filesystems in /etc/fstab that are currently available.

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

-p

Which option to the ss command shows the process IDs associated with the socket?

-r causes umount to attempt to remount in read-only mod

Which option to umount will cause the command to attempt to remount the filesystem in read-only mode if the unmounting process fails?

-f

Which option to xfs_check is used to verify a filesystem that is stored in a file?

-g option displays progress of the dumb.

Which option to xfs_metadump displays a progress indicator?

c option in gdisk is used to change the partition name.

Which option within gdisk will change the partition name?

-A option checks all filesystems in /etc/fstab,

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

0xFD

Which partition type is used to indicate a software RAID array, such as an array built with mdadm?

connect

Which subcommand to the virsh command is used to connect to the hypervisor?

Blob

Which type of storage would be the most appropriate format to store a large object as a single file in a cloud environment?

Bare-metal

Which type of virtualization hypervisor is considered a Type 1 hypervisor?

/media mount point is used for removable media

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

The /srv hierarchy is used for data for server programs. 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.

According to the Filesystem Hierarchy Standard (FHS), what is the correct location for site-specific data for a server?

Use fdisk to create partitions, then format the partitions using a command such as mkfs, and then mount the partitions. 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

After inserting a new hard drive into the system, what is the correct order to make the drive ready for use within Linux?

LC_ALL

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

/etc/sysctl.conf

If you'd like a value set with the sysctl command to take effect on boot, within which file should you place the variable and its value?

/etc/sysconfig/network

In a scripting scenario, you need to enable legacy locations for things like networking. Which file can be used for storing network configuration?

-f

The system contains an NFS mounted filesystem that has become unreachable. Which option should be passed to umount in order to force the unmounting of the filesystem?

du

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?

-D

While troubleshooting a kernel issue and using the console, you are having difficulty working with the console due to continual messages being displayed on the console itself. Which option to dmesg can be used to disable logging to the console?

/dev/disk/by-uuid

While you can use blkid to obtain the UUIDs for filesystems, which location on the filesystem also shows this information?

/usr/share/zoneinfo

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

/boot/efi

Within which partition will the EFI system partition typically be mounted?

LACP

You are building a configuration that requires bonded-link aggregation on the Linux server. Which protocol should the switch support in order to take advantage of aggregation?

-b 4M The block size for import or restore must match the block size used on export or dump

You are performing an xfsrestore. The xfsdump was executed with a block size of 4M. Which option do you need to invoke on xfsrestore in order for it to successfully use this dump?

Persistent volume

You are using a container image for a cloud deployment and are building a stateful application that must store data between deployments. Which type of storage should be used?

tune2fs -e continue

You are using a storage area network (SAN) that keeps causing errors on your Linux system due to an improper kernel module created by the SAN vendor. When the SAN sends updates, it causes the filesystem to be mounted as read-only. Which command and option can you use to change the behavior of the filesystem to account for the SAN bug?

mkinitrd

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?

ethtool -i ens3

You are working with a network interface called ens3 and would like to determine which driver is being used for this device. Which command is valid for this purpose?

brctl

Which command is used to create an ethernet bridge?

modinfo

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

dev/sda1 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.

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?

/var/log/kern.log

After recovering from kernel panic, you would like to look at what might have happened. Which of the following files contains the kernel ring buffer messages?

/etc/modprobe.conf

Assume you need to add a kernel module with a custom command, such as to specify options at load time. Within which file could you add this configuration?

/sys/block/sda/stat

Assuming a block storage device used for virtualization of sda, which file can be used to view the number of read I/O requests for the device?

mount /dev/sdb1 /media/usb

Assuming that a USB disk contains a single partition and is made available on /dev/sdb, which command mounts the disk in /media/usb?

YAML

Files found within the /etc/netplan directory should be formatted using which syntax?

/dev/mapper

Information about logical volumes can be found in which of the following directories?

dmesg

Which command can be used to view the kernel ring buffer in order to troubleshoot the boot process?

Between 100 MB and 500 MB

Of the following choices, which size would be most appropriate for the /boot partition of a Linux system?

/etc/network

On a Debian system, within which directory hierarchy will you find configuration information and directories to hold scripts to be run when an interface is brought up or taken down?

iwconfig

Which command is used for setting parameters such as the essid, channel, and other related options for a wireless device?

lvcreate

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

xfs_growfs -n.

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

4

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

-R

When checking filesystems with the fsck command, which option skips checking of the root filesystem?

-y The -y option will attempt to repair automatically, essentially answering 'y' or yes instead of prompting - v is for verbose output

When running fsck on an ext3 filesystem, the process is taking longer than expected and requiring input from the administrator to fix issues. What option could be added to fsck next time so that the command will automatically attempt to fix errors without intervention?

MAILADDR

When running mdadm in monitor mode, which option within /etc/mdadm.conf sets the destination for email if an issue is discovered?

Relative

When troubleshooting a file that is not found, you notice that the file location is linked as ../file.txt. Which type of path has been used for this file?

pxelinux.0

When using PXE boot, which file must exist within /tftpboot on the TFTP server for the system that will use PXELINUX for its bootloader?

WWID

When using a multipath device, found in /dev/disk/by-multipath, what is the name given to the identifier for that device that is globally unique?

grubx64.efi

When using a shim for booting a UEFI-based system, which of the following files is loaded after shim.efi?

YAML

When using cloud-init for deployment of an EC2 instance, which format should be used for the configuration files?

Raw device

When using fdisk to partition a disk, you have two partitions created for the system but still have leftover space, also called unallocated space, on the drive. What is another name used to refer to unallocated space?

-p

When using iostat to assess performance, which option displays information on a per- partition basis for block devices?

server

When using nslookup interactively, which of the following commands changes the destination to which queries will be sent?

-sh

When using the du command to diagnose which directories are large, you would like to summarize the output in a more human-friendly format. Which option(s) should be used?

inet

When using the ip command, which protocol family is used as the default if not otherwise specified?

-E

When using tune2fs to set an extended option such as stripe_width, which command- line option is needed to signify that an extended option follows?

pci-0000:1a:00.0-fc-0x500601653ee0025f:0x0000000000000000

When viewing information in /dev/disk/by-path using the command ls -l, which of the following filenames represents a LUN from Fibre Channel?

The G signifies that this is a gateway.

When 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?

/dev/disk/by-id

When working with World Wide Identifiers (WWIDs), within which directory on a Red Hat server will you find symlinks to the current /dev/sd device names?

dracut

When working with a CentOS 6 system, which command is used to create the initial RAM disk?

Common Internet File System

When working with a Microsoft Windows-based filesystem, you see that it is mounted as a CIFS mount. What does CIFS stand for?

Dual-homed

When working with a network configuration, which of the following terms refers to a computer with two network interfaces?

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

When working with disk partitions through a tool like fdisk, you see the type 0x82. Which type of partition is this?

lpxelinux.0

Which PXE Linux binary file is required for booting from HTTP or FTP?

ISOLINUX

Which bootloader can be used to boot from ISO with ISO9660 CD-ROMs?

tune2fs -h command displays a lot of information about filesystems including the number of times the filesystem has been mounted.

Which command and option are used to display the number of times a filesystem has been mounted?

tune2fs -c

Which command and option are used to set the maximum number of times a filesystem can be mounted between running fsck?

The parted command can be used to resize partitions in such a way.

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?

time

Which command can be used to determine how much time a Linux command takes?

ip command with the monitor option/subcommand will display netlink messages as they arrive

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

lsmod

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

The timedatectl command includes a list-timezones

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

JavaScript Object Notation

You have been asked to create a template for virtualization. The template will be in JSON format. Which of the following is the correct name for JSON?

e2label

You need to change the label that has been applied to a filesystem. The filesystem is formatted as EXT4. Which EXT tool can be used to change the label?

-m

You need to create a script for use with the parted command. When using the parted command to obtain a list of partitions, which additional option formats the output such that it can be more easily parsed by a script?

--list

You need to determine if ASCII and Unicode are supported on the system. Which option to the iconv command shows the available character sets on a given system?

Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.

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?

rw, suid, dev, exec, auto, nouser, async

You see the word defaults within /etc/fstab. Which options are encompassed within the defaults?


Set pelajaran terkait

MITOCHONDRIA IS THE POWERHOUSE OF THE CELL

View Set

Logistics Midterm Study Questions Mahesh

View Set

Other Federal and State Regulations

View Set

Cognitive Science Chapter 12 & 13

View Set

Trådløs kommunikasjon naturfag

View Set

owners + masters [frederick douglass]

View Set

Class 2 (sem 2) - Digestive system (part 2)

View Set