Linux Exam 2 study guide

Ace your homework & exams now with Quizwiz!

Which of the following operators reverses the meaning of a test statement?

!

In order to redirect a file to the standard input of a command, what metacharacter should be used?

"<" (please disregard the double quote marks . . . I had to put the left angle bracket inside the double quotes to make it show up. The reason being that Canvas was interpreting the left angle bracket as an HTML character and so it was not visible unless inside the double quote marks.)

What character combination at the start of a shell script are referred to as a hashpling, and allow for the specification of the shell that interprets the contents of the script?

#!

Which of the following indicates the second partition on the third hard disk drive to GRUB?

(hd2,1)

The mkfs command can be issued with what switch in order to specify a filesystem type?

-t

Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? [BEGIN CODE] /dev/sda1 / ext4 defaults 1 1 none /dev/pts devpts gid=5,mode=620 1 0 none /proc proc defaults 0 1 none /dev/shm tmpfs defaults 1 0 /dev/sdc2 swap swap defaults 0 1 /dev/dvd /media/dvd iso9660 noauto,ro 0 0 /dev/fd0 /media/floppy auto noauto 0 0 [END CODE]

/, /dev/pts, and /dev/shm

In what directory is Stage2 of the GRUB2 boot loader stored?

/boot

Under what directory is the Linux kernel stored?

/boot

Which device file below represents the first primary partition on the second PATA hard disk drive?

/dev/hdb1

You plug in a USB flash memory drive into a system that has two SATA hard disks. How will the partition on this USB flash memory drive be identified by Linux?

/dev/sdc1

What character device file represents the second serial port on a system (COM2)?

/dev/ttyS1

In Fedora 20, where are user configured settings for Xorg stored?​

/etc/X11/xorg.conf.d/

Which directory stores most UNIX SysV rc scripts?

/etc/init.d

Which file does the UNIX SysV init daemon reference on startup to determine the default runlevel?

/etc/inittab

What environment file is always executed immediately after login for all users on the system, and sets most environment variables, such as HOME and PATH?

/etc/profile

Which of the following files is always executed immediately after a user logs in to a Linux system and receives a BASH shell?

/etc/profile

What is the name of the directory that contains symbolic links to UNIX SysV rc scripts for runlevel 2?

/etc/rc2.d

To ensure that Linux has detected the correct amount of RAM in the system after installation, you should view the contents of what file in the proc directory?

/proc/meminfo

To which directory will the test ZFS volume from the previous question be mounted by the ZFS system?

/test

You want to view log files to get information about a problem that occurred during a Linux installation. In which directory will you likely find the log files?

/var/log

At what runlevel does a Linux system have no daemons active in memory, allowing it to be safely powered off?

0

What number represents the stdin file descriptor?

0

Which runlevel halts the system?

0

Which of the following file descriptor numbers represents stdout?

1

In some cases, the installation process fails to place a boot loader on the hard disk properly; this is often caused by hard drives with over what number of cylinders?

1024

The first software RAID volume on a system will​ use a multiple disk device file that starts with what number?

127

Most Parallel SCSI controllers are capable of supporting up to how many devices?

15

Linux servers are typically installed in a rack using rackmount server hardware. Which of the following is used to describe the minimum height of a rackmount server?

1U

In Linux, what runlevel is also known as the multiuser mode?

2

What number represents the stderr file descriptor?

2

Which RAID level uses striping with parity?

5

In a SCSI chain the highest priority SCSI device is given what SCSI ID?

7

The standard output and standard error from a terminal screen within the BASH shell can be redirected to a file on the filesystem using what shell metacharacter, followed by the absolute or relative pathname of the file?

>

Which of the following could result in a segmentation fault (fatal signal 11) during a Fedora installation?

All of the above.

How do you indicate a comment line in a shell script?

Begin the line with #.

Which of the following statements is true?

Either the MBR/GPT or the active partition can contain the boot loader.

After a partition on a hard disk drive is formatted with a filesystem, all partitions on that hard disk drive must use the same filesystem. True or False?

False

Because stderr and stdout represent the results of a command and stdin represents the input required for a command, only stderr and stdout can be redirected to/from a file. True or False?

False

Character devices typically transfer data more quickly than block devices. True or False?

False

RAID-Z is functionally equivalent to RAID level 1. True or False?

False

SAS transfers data to SCSI disks via parallel cables. True or False?

False

ZFS volumes are mounted at boot time from entries within /etc/fstab by default? True or False?

False

What does >> accomplish when entered on the command line after a command?

It appends Standard Output to a file.

Which of the following statements is true?

LILO needs to be reinstalled after it has been modified.

You wish to configure the runlevels that a particular upstart daemon is started in. What should you do?

Modify the daemon configuration file within the /etc/init directory

A user runs the fsck command with the -a option on a filesystem that is showing signs of corruption. How would that user locate any files the system was unable to repair?

Mount the filesystem and check the lost+found directory underneath the mount point

What is wrong with the following command string ls /etc/hosts >listofhostfile?

Nothing is wrong with the command.

Which of the following items are you typically required to configure during a Linux server installation? (Choose all that apply.)

Package selection Boot loader configuration System host name Update configuration

Which of the following statements are true? (Choose all that apply.)

Quotas can limit both user space and the number of files a user can own. Hard limits can never be exceeded. Soft limits allow a user to exceed them for a certain period of time.

Which of the following RAID levels is not fault tolerant?

RAID 0

Which RAID level is also referred to as mirroring?

RAID 1

​A ZFS volume that uses a variable stripe size and requires a minimum of three hard disks to protect against single disk failure is known as:

RAID-Z

What SCSI type supports speeds of up to 80 MB/second?

SCSI-3 Ultra2 Wide

What stage of the GRUB boot loader typically resides on the MBR / GPT?

Stage1

Consider the following shell script: echo -e "What is your favorite color?--> \c" read REPLY if [ "$REPLY" = "red" -o "$REPLY" = "blue" ] then echo "The answer is red or blue." else echo "The answer is neither red nor blue." fi What would be displayed if a user executes this program and answers Blue when prompted?

The answer is neither red nor blue.

The first floppy drive on the system is not responding. You enter the file /dev/fd0 command and receive the following output. What is the problem? [root@server1 root]# file /dev/fd0 /dev/fd0: ASCII text [root@server1 root]#

The device file has become corrupt.

A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are remaining objects to process. True or False?

True

The alias command can be used to make a shortcut to a single command. True or False?

True

The lvextend command can be used to add additional unused space within a volume group to an existing logical volume. True or False?

True

The sed and awk commands are filter commands commonly used to format data within a pipe. True or False?

True

A user mounts a device to a mount point directory and realizes afterward there are files previously found within the mount point directory that are needed. What should this user do?

Unmount the device from the directory.

What must you do to successfully run the fsck command on a filesystem?

Unmount the filesystem.

Jim has just purchased two new SCSI hard disk drives and a controller card for them. He properly installs the hardware in his machine. Before he can use them for data storage and retrieval, what must he do? (Choose all that apply.)

Use the fdisk command to create one or more partitions on each of the hard disk drives. Mount any partitions created on the two hard drives such that they are accessible by the operating system. Format any partitions created with a valid filesystem recognized by Linux.

Which of the following statements regarding LVM structure is correct?

VGs are comprised of one or more PVs.

What would be the effect of using the alias command to make an alias for the date command named cat in honor of your favorite pet?

When you use the cat command at the command prompt with the intention of viewing a text file, the date appears instead.

Which two implementations of X Windows are commonly used in Linux? (Choose two answers.)

X.org XFree86

You have redirected stderr to a file called Errors. You view the contents of this file afterward and notice that there are six error messages. After repeating the procedure, you notice that there are only two error messages in this file. Why?

You did not append the Standard Error to the Error file and as a result, it was overwritten when the command was run a second time.

What is the term for a ZFS managed filesystem that is created from ZFS pools?​

ZFS volume

Select the test statement that can be used to determine if A is numerically greater than B:

[ A -gt B ]

Select the escape sequence that is used for a form feed:

\f

SCSI devices that use an 8-bit wide data path use _______.

a 50-pin connector

The ability to extract, manipulate, and format text using pattern action statements belongs to which command below?

awk

You want to see the filesystems that are presently in use on the system. What command could you use?

cat /etc/mtab

Which of the following will display the message welcome home if the cd /home/user1 command is successfully executed?

cd /home/user1 && echo "welcome home"

A device that transfers data in a character-by-character fashion is referred to as what type of device?

character

Which of the following commands can be used to start a UNIX SysV daemon called lala in runlevels 1, 2 and 3?

chkconfig --level 123 lala on

Which command can you use during a system rescue to switch from the root of the live OS to the root of the Linux system installed on the hard disk?

chroot

​Select the command that can be used to change the root filesystem to a different directory, such as when in a rescue environment.

chroot

What character is used to delimit most Linux configuration files?

colon

Which command below provides the easiest method for monitoring free space on mounted filesystems?

df

Which command is used to display the amount of free space that exists on a filesystem?

df

What does the command dumpe2fs -h do?

displays the number of inodes used and available in an ext2 filesystem

Select the command below that shows the size of a directory and its contents in kilobytes:​

du

The default BASH shell prompt is set by an environment variable. What command can be used to view this variable?

echo $PS1

The current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.)

echo ~ echo $HOME

The quotas for certain users can be edited by using which command?

edquota

A list of all exported environment and user-defined variables in a shell can be viewed with what command below?

env

Before a user-defined variable can be used by processes that run in subshells, that variable must be __________.

exported

Select the command that can be used to create partitions that will be stored in an MBR after installation:

fdisk

Every if construct begins with if and must be terminated with?

fi

Errors on a filesystem are common on most filesystems. What do these errors indicate?

filesystem corruption

What command can be used to check different kinds of filesystems on Linux for errors?

fsck

What Systemd target corresponds to runlevel 5?

graphical.target

What command below can be used to re-install GRUB2 in the event that the boot loader becomes corrupted?​

grub2-install

You have recently modified the options within the /etc/default/grub file. What command can you use next to rebuild the GRUB2 configuration file?

grub2-mkconfig

A device file _______________________. (Choose all that apply.)

has no data section displays a major and minor number in place of a file size

Which of the following is used to describe a computer that is used to access an iSCSI hard disk across the network?

iSCSI initiator

In the /etc/lilo.conf file, what keyword should be specified in order to provide the absolute pathname to the Linux kernel?

image=

Where is the /proc filesystem stored?

in RAM

The first daemon loaded on a Linux system is _____.

init

Which command causes the system to enter Single User Mode?

init 1

What file in the /proc directory contains a list of memory address ranges reserved for device use?

ioports

Which of the following commands can be used on a Fedora 20 system to view hardware and service startup information during the boot process?

journalctl -b

Select the file in the /proc directory that contains statistics on the performance of the processor:

loadavg

Which command is used to format a partition on a hard disk drive with the ext4 filesystem?

mke2fs -t ext4 device

What file under the proc directory contains information regarding what modules are currently loaded into the Linux kernel?​

modules

To mount all filesystems in the /etc/fstab file that are intended to mount at boot time, what command can be used?

mount -a

Which command mounts all existing filesystems in /etc/fstab?

mount -a

Which of the following commands can be used to create partitions on either a MBR or GPT hard disk?

parted

What keyword tells the Linux kernel to avoid printing errors to the screen during system startup?​

quiet

Which construct can be used in a shell script to read Standard Input and place it in a variable?

read

What permissions are required to execute a shell script in a manner similar to any other executable program on the system?

read and execute

In what filesystem are most of the operating system files contained?

root

The timeout value in the GRUB configuration file is measured in?

seconds

If a Linux installation ends abnormally and the screen displays a fatal signal 11 error, what type of error has occurred?

segmentation fault

Which of the following is not a type of RAID?

serial RAID

Which command below can be used to start, stop, or restart any daemons in the /etc/init.d directory?

service

The environment variables that are set by default and their current values can be viewed with what command?

set

Which command could you use to see a list of all environment and user-defined shell variables as well as their current values?

set

What does the du /var command do?

shows the size of all directories within the /var directory

What keyword can be specified within a boot loader to force the system to boot to Single User Mode?

single

SCSI-1 is also referred to as _______.

slow and narrow

Which type of RAID is entirely configured during the Linux installation process?

software RAID

Which of the following is not necessarily generated by every command on the system? (Choose all that apply.)

standard input standard deviation

Which command can be used to start X Windows, the window manager, and the default desktop environment?

startx

In order to change keyboard layout if X Windows can't detect the layout, you should use what CLI command?

system-config-keyboard

Which of the following Systemd commands can be used to stop a daemon called lala?

systemctl stop lala.service

Each SCSI device attached to a system must be assigned an ID number. What is this ID number called?

target ID

What command can be used to replace characters in a file sent via Standard Input?

tr

Data is read from physical hard drives in concentric circles known as which of the following?

tracks

What file system below is used by software programs that write to a CD-RW or DVD-RW drive?

udf

Which command can be used to count the number lines, words, and characters in a file?

wc

Once X Windows is configured, what command can be used to fine tune the vertical and horizontal refresh rate?

xvidtune

Which command can be used to fine-tune the vsync and hsync of a video card for use in X Windows?

xvidtune

In order to list all configuration parameters that can be modified for a subfilesystem, what command should be issued?​

zfs get all

What command can be used to create a ZFS volume called test from the space on /dev/sdb and /dev/sdc that functions like RAID level 1?

zpool create test mirror /dev/sdb /dev/sdc

Select the metacharacter that can be used to send the standard output of one command to another command as standard input:

|

​What operator below is known as the NOT operator?

​!

In standard GRUB notation, select the option below that represents the first hard drive in a system, and the first partition on that hard drive.​

​(hd0,0)

Which option, when used with the mount command, enables loopback mode so that an iso image can be mounted onto a directory?​

​-o loop

What file controls the default runlevel when using Systemd?​

​/etc/systemd/system/default.target

What file in the /proc directory contains information about a computer's CPU?​

​/proc/cpuinfo

You are troubleshooting an issue that occurs on a Linux system during the boot process. What file can be viewed on most Linux systems to see processes that started successfully or unsuccessfully specifically during the boot process?​

​/var/log/boot.log

The GUI components and related software take up how much space on a typical Linux installation?

​4 GB

What hex code is associated with a Linux swap type partition?​

​82

​What RAID level is commonly referred to as disk striping with parity?

​RAID5

Select the escape sequence that starts a new line when used with echo:

​\n

On Linux systems that use the traditional ​UNIX SysV init, what command below can be used to list and modify the runlevels that a daemon is started in?

​chkconfig

Select the command that can be used to check an ext2, ext3, or ext4 filesystem:​

​e2fsck

​What construct is intended for use in processing a list of objects, such as files, directories, users, printers, and so on?

​for

What is the default target on a system with a GUI installed?​

​graphical.target

After modifying the /etc/default/grub file, what command should be run to rebuild the grub config files?​

​grub-mkconfig

What command can be used to configure the LILO, ELILO, GRUB, and GRUB2 bootloaders?​

​grubby

​In Fedora 20, the logging system used to record the messages normally stored within the boot.log, messages, and syslog files has been replaced by a journaling database system called?

​journald

What command below can be used to uninstall the LILO bootloader from an active partition?​

​lilo -U

What command is used to manage a software RAID configuration after installation?​

​mdadm

​What command below can be used to create a new physical volume?

​pvcreate

In the event that you wish to disable a swap partition, what command must be used?​

​swapoff

​When using Systemd, what command can be used to start, stop, and configure daemons to start automatically when the system starts?

​systemctl

​In the fdisk interactive mode, what letter can be used to save changes to the partition table and exit?

​w


Related study sets

MAR 445 Brand Management Quiz #1

View Set

Chapter 11 Anthropology Homework

View Set