Chapter 1-7 Midterm
What must a user do to run cp or mv interactively and be asked if she wants to overwrite an existing file? a. There is no choice, because the new file will overwrite the old one by default. b. Type interactive cp or interactive mv. c. Type cp -i or mv -i. d. Type cp -interactive or mv -interactive. e. Just type cp or mv, because they run in interactive mode by default.
Just type cp or mv, because they run in interactive mode by default.
Which of the following are factors that determine which Linux distribution a user will use?
Package manager support, hardware platform, kernel features, and language support
How can you protect a metacharacter (such as the $ character) from shell interpretation? It cannot be done as metacharacters are essential Precede it with a $ Precede it with a \ Precede it with a / Follow it with a \
Precede it with a \
How can you specify a text pattern that must be at the beginning of a line of text using a regular expression? a. Precede the string with a / b. Follow the string with a \ c. Precede the string with a $ d. Precede the string with a ^
Precede the string with a ^
How can a user switch from insert mode to command mode when using the vi editor? a. Press the Ctrl+Alt+Del keys simultaneously. b. Press the Del key. c. Type in a : character. d. Press the Esc key.
Press the escape key.
SCSI-1 is also referred to as _____. Fast and wide Slow and wide Slow and narrow Fast and narrow
Slow and narrow
Hard links need to reside on the same filesystem as the target, whereas symbolic links need not be on the same filesystem as the target. True False
True
Linux has only one root directory per directory tree. 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 False
True
The sed and awk commands are filter commands commonly used to format data within a pipe. True or False?
True
What must you do to successfully run the fsck command on a filesystem? a. Ensure that the filesystem is mounted. b. Choose yes when warned that running fsck on a mounted filesystem can cause damage. c. Run the fsck command with the -u option to automatically unmount the filesystem first. d. Unmount the filesystem.
Unmount the filesystem.
You find that a device file in the /dev directory has become corrupted. You know that this device is /dev/tty3 and that it is a character device file. What should you do?
Use the /dev/MAKEDEV command to re-create the file
hich of the following could result in a segmentation fault (fatal signal 11) during a Fedora installation? Improper device driver All of these Overclocked CPU RAM problems
All of these
What is the most common open source Web server available for Linux?
Apache
Which two people are accredited with creating the UNIX operating system? (Choose two answers.) Correct! Dennis Ritchie Linus Torvalds Ken Thompson Richard Stallman
Dennis Ritchie Ken Thompson
What was created to define a standard directory structure and common file location for Linux? a. FSH b. X.500 c. FHS d. root directory
FHS
Because Standard Error and Standard Ouput represent the results of a command and Standard Input represents the input required for a command, only Standard Error and Standard Ouput can be redirected to/from a file. True or False?
False
Which of the following is not a piece of information that the Fedora installation program prompts you for? Keyboard layout Installation destination Firewall settings Time zone
Firewall settings
Which common GUI environments are available in most Linux distributions?
GNOME and KDE
To which license does Linux adhere?
GNU Public License
Which of the following are common methods for gaining support for Linux?
HOWTO documents, a local Linux User Group (LOG), and Internet newsgroups.
Linux was developed by __________ to resemble the _________ operating system.
Linus Torvalds, MINIX
Which of the following can be used on Linux to provide file and print services?
Samba
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]# a. The device file has become corrupt. b. The floppy drive is seen as a character device. c. There is no floppy disk in the drive. d. The floppy drive cable has come loose.
The device file has become corrupt.
Which culture embraced the term GNU (GNU's Not UNIX) and laid the free software groundwork for Linux?
The hacker culture.
Which of the following items are you typically required to configure during a Linux server installation? (Choose all that apply.) Update configuration Boot loader configuration Package selection System host name
Update configuration Boot loader configuration Package selection System host name (all of the above)
The core component of the Linux operating system is the Linux kernel. If you were a Linux systems administrator for a company, when would you need to upgrade your Linux kernel? (Choose all that apply.) When you need to have support in Linux for new hardware. When you need to use kernel modules. When you need to increase the stability of Linux. When you need another user interface.
When you need to have support in Linux for new hardware. When you need to increase the stability of Linux.
Using wildcard metacharacters, how can you indicate a character that is not a or b or c or d? a. [^abcd] b. not [a-d] c. [!a-d] d. !a-d
[!a-d]
SCSI devices that use an 8-bit-wide data path use _____. a 68-pin connector an 8-pin connector a 50-pin connector a 15-pin connector
a 50-pin connector
What command is equivalent to the man -k keyword command? appaloosa keyword apropos keyword find keyword man keyword
apropos keyword
You want to see the filesystems that are presently in use on the system. What command could you use? cat /etc/mtab ls -l /etc/fstab ls -l /etc/fstab cat /etc/fstab
cat /etc/mtab
When applied to a directory, the SGID special permission ________________. a. causes all new files created in the directory to have the same group membership as the directory, and not the entity that created them b. cannot be used, because it is applied only to files c. allows users to use more than two groups for files that they create within the directory d. causes users to have their permissions checked before they are allowed to access files in the directory
causes all new files created in the directory to have the same group membership as the directory, and not the entity that created them
If a user's current directory is /home/mary/project1, which command could she use to move to the etc directory directly under the root? a. cd .. b. cd /home/mary/etc c. cd etc d. cd /etc e. cd \etc
cd /etc
Which command is used to display the amount of free space that exists on a filesystem? du fsck df quota
df
The tac command _____.
displays the contents of a file in reverse order, last word on the line first and first
What does the command dumpe2fs -h do? a. is not a valid command b. displays the number of inodes used and available in an ext2 filesystem c. backs up an ext2 filesystem d. dumps an ext2 filesystem
displays the number of inodes used and available in an ext2 filesystem
What command can you use to safely shut down the Linux system immediately?
halt
Which of the following is used to describe a computer that is used to access an iSCSI hard disk across the network? iSCSI target iSCSI initiator iSCSI requestor iSCSI terminato
iSCSI initiator
Which command would a user type on the command line to find out which directory in the directory tree he is currently located in? a. pd b. cd c. where d. pwd
pwd
If "resume" is the name of a file in the home directory off the root of the filesystem and your present working directory is home, what is the relative name for the file named resume? a. /home/resume b. /resume c. resume d. \home\resume
resume
Given the following output from the ls command, how many files are linked with file1? drwxr-xr-x 3 root root 4096 Apr 8 07:12 Desktop -rw-r--r-- 3 root root 282 Apr 29 22:06 file1 -rw-r--r-- 1 root root 282 Apr 29 22:06 file2 -rw-r--r-- 4 root root 282 Apr 29 22:06 file3 -rw-r--r-- 2 root root 282 Apr 29 22:06 file4 -rw-r--r-- 1 root root 282 Apr 29 22:06 file5 -rw-r--r-- 1 user1 sys 282 Apr 29 22:06 file6 a. one b. two c. three d. four
two
Which command displays the users who are currently logged in to the Linux system?
who
Which of the following operators reverses the meaning of a test statement? a. -o b. ! c. #! d. -a
!
Which prompt does the root user receive when logged in to the system? # @ $ !
#
You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate? a. Special permissions have been set on the file. b. Additional entries exist within the ACL of the file that can be viewed using the getfacl command. c. The sticky bit directory permission has been set on the file, and will remain inactive as a result. d. The file has one or more files on the filesystem that are hard linked to it.
Additional entries exist within the ACL of the file that can be viewed using the getfacl command
There is no real difference between the "S" and "s" special permissions when displayed using the ls -l command. One just means it is on a file and the other that it is on a directory. True or False?
False
Users enter commands directly to the kernel of the Linux operating system.
False
The vi editor can function in which two of the following modes? (Choose both that apply.) a. text b. command c. input d. interactive e. insert
Insert Command
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
A device file ______. a. has no size b. has a fixed size of 300 kilobytes c. has no inode section d. displays a major and minor number in place of a file size
displays a major and minor number in place of a file size
What does the du /var command do? a. shows the size of all directories within the /var directory b. dumps the /var directory c. shows the users connected to the /var directory d. displays the amount of free space in the /var directory
displays the amount of free space in the /var directory
The current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.) a. echo /HOME/ b. echo ~ c. echo ls HOME d. echo HOME=
echo ~ echo $HOME
Before a user-defined variable can be used by processes that run in subshells, that variable must be __________.
exported
What equivalent to the man command generally provides an easier-to-read description of the queried command and also contains links to other related information? man help info man -descriptive who
info
Which construct can be used in a shell script to read Standard Input and place it in a variable? read sum test verify
read
Which of the following refers to the third primary partition on the second SCSI hard disk within Linux? hdb2 sdb3 sda3 hdb3
sdb3
After typing the command umask 731, the permissions on all subsequently created files and directories will be affected. In this case, what will be the permissions on all new files? a. rw-rw-rw b. rwxrw-r-- c. - - -r--rw d.- - --wx--x
---r--rw-
The command chmod 317 file1 would produce which of the following lines in the ls command? a. --w-r--rwx 1 user1 root 0 Apr 29 15:40 file1 b. --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1 c. -rwxrw-r-x 1 user1 root 0 Apr 29 15:40 file1 d. --w-rw-r-e 1 user1 root 0 Apr 29 15:40 file1
--wx--xrwx 1 user1 root 0 Apr 29 15:40 file1
Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? /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 a. /, /dev/pts and /dev/shm b. /, /proc and swap c. None of them. fsck must be run manually for each filesystem d. All of them. fsck is run automatically at boot for all filesystems
/, /proc and swap (Second digit is a 1)
Which of the following is an absolute pathname? (Choose all that apply.) a. Home/resume b. C:\myfolder\resume c. resume d. /home/resume e. C:home/resume
/home/resume
To which directory will the test ZFS volume from the previous question be mounted by the ZFS system? /zfs/test /test /mnt/test /media/test
/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? /etc/log /var/log /sys/log /root/log
/var/log
Which of the following file descriptor numbers represents stdout? 2 0 1 3
1
RAID-Z is functionally equivalent to RAID level 1. True False
False
SAS transfers data to SCSI disks via parallel cables. True False
False
The less command offers less functionality than the more command. True or False?
False
What is wrong with the following command? ls /etc/hosts >listofhostfile a. The file descriptor was not declared; unless 1 for Standard Ouput or 2 for Standard Error is indicated, the command will fail. b. The file listofhostfile will always only contain Standard Error as a file descriptor was not declared. c. The ls command is one of the commands that cannot be used with redirection; you must use | to pipe instead. d. Nothing is wrong with the command.
Nothing is wrong with the command.
Where is the /proc filesystem stored? On the hard disk drive in the / directory RAM On the hard disk drive in the /etc directory On the hard disk drive in the /var directory
RAM
Who formed the Free Software Foundation to promote open development?
Richard Stallman
The root user utilizes the chgrp command to give ownership of a file to another user. What must the root user do to regain ownership of the file? a. Run chgrp again listing the root user as the new owner. b. Nothing, because this is a one-way, one-time action. c. Have the new owner run chgrp and list the root user as the new owner. d. Run chown and list the root user as the new owner.
Run chown and list the root user as the new owner.
Which of the following is not necessarily generated by every command on the system? (Choose all that apply.) Standard Error Standard Deviation Standard Output Standard Input
Standard Deviation Standard Input
Which command searches for and displays any text contents of a binary file? a. text b. strings c. od d. less
Strings
Which of the following statements regarding LVM structure is correct? a. VGs are comprised of one or more PVs b. PVs are collections of VGs c. LVs are created from the free space available within PVs d. PVs use the space within LVs to create VGs
VGs are comprised of one or more PVs
A file has the following permissions: r- - --x-w-. The command chmod 143 would have the same effect as the command _________________. (Choose all that apply.) a. chmod u+x-r,g+r-x,o+w file1 b. chmod u=w,g=rw,o=rx file1 c. chmod u-r-w,g+r-w,o+r-x file1 d. chmod u=x,g=r,o=wx file1 e. chmod u+w,g+r-w,o+r-x file1 f. chmod u=rw,g=r,o=r file1
chmod u=x,g=r,o=wx file1
Which of the following commands will change the user ownership and group ownership of file1 to user1 and root, respectively? a. chown user1:root file1 b. chown user1 : root file1 c. This cannot be done, because user and group ownership properties of a file must be modified separately. d. chown root:user1 file1 e. chown root : user1 file1
chown user1:root file1
Which command is used to format a partition on a hard disk drive with the ext4 filesystem? a. format_ext4 device b. e2mkfs -t ext4 device c. ext4mkfs device d. makeext4FS device
e2mkfs -t ext4 device
Which of the following files is always executed immediately after any user logs in to a Linux system and receives a BASH shell? /etc/profile ~/.bash_login ~/.profile ~/.bash_profile
etc/profile
Which of the following commands can be used on a Fedora 20 system to view hardware and service startup information during the boot process? less /var/log/syslog less /var/log/messages less /var/log/boot.log journalctl -b
journalctl -b
You know a Linux command will perform a desired function for you, but you cannot remember the full name of the command. You do remember it will flush a variable from your system. Which command typed at a command prompt displays a list of commands that would likely contain the command you desire? man -k flush all man -k flush man -key flush man flush
man -k flush
A production kernel refers to a kernel whose:
minor number is even
Which command mounts all existing filesystems in /etc/fstab? mount /etc/fstab mount /etc/mtab mount -a mount -f
mount -a
Which of the following commands can be used to create partitions on either a MBR or GPT hard disk? fdisk cfsck parted gdisk
parted
A special device file is used to _____. a. enable proprietary custom-built devices to work with Linux b. represent hardware devices such as hard disk drives and ports c. keep a list of device settings specific to each individual user d. do nothing in Linux
represent hardware devices such as hard disk drives and ports
The default permissions given by the system prior to analyzing the umask are ________________ for directories and ________________ for files. a. rw-rw-rw- and rw-rw-rwb. rw-rw-rw- and r- -r- -r- - c. rw-rw-rw- and rwxrwxrwx d. rwxrwxrwx and rw-rw-rwe. rwxrw-rw- and rwx-rw-rw-
rwxrwxrwx and rw-rw-rwe
Which two partitions do you typically create at minimum during a Fedora Linux installation? (Choose two answers.) /boot swap /home /
swap /
A user types in the command head /poems/mary. What will be displayed on the terminal screen?
the first 10 lines of the file mary
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
Which prompt do regular users receive when logged in to the system? $ ! @ #
$
Which of the following kernels are developmental kernels? (Choose all that apply.) 3.4.4 3.3.4 3.2.7 3.5.5
3.3.4 3.5.5 (odd second number, or "minor number")
Which RAID level uses striping with parity? 5 1 2 4
5
A symbolic link is also known as a soft link and is depicted by an @ symbol appearing at the beginning of the filename when viewed using the ls -l command. True or False?
False
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 False
False
Character devices typically transfer data more quickly than block devices. True False
False
If you boot your computer from Linux live media, you will be able to use a fully-functional Linux system prior to installing Linux on permanent storage. True or False
False
If a user's current directory is /home/mary/project1, which command could she use to move to the etc directory directly under the root?
It's an executable.
When the core components of the Linux operating system are packaged together with other Open Source Software, it is called a:
Linux Distribution
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? a. Mount the two hard drives so they are accessible by the operating system. b. Mount any partitions created on the two hard drives such that they are accessible by the operating system. c. Use the fdisk command to create one or more partitions on each of the hard disk drives. d. Format any partitions created with a valid filesystem recognized by Linux.
Mount any partitions created on the two hard drives such that they are accessible by the operating system. Use the fdisk command to create one or more partitions on each of the hard disk drives. Format any partitions created with a valid filesystem recognized by Linux.
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
Which of the following statements are true? a. Hard limits allow a user to exceed them for a certain period of time. b. Quotas can limit both user space and the number of files a user can own. c. Quotas can only limit user space. d. Quotas can only limit the number of files a user can own.
Quotas can limit both user space and the number of files a user can own.
Which of the following RAID levels is not fault tolerant? RAID 1 RAID 0 RAID 5 RAID 4
RAID 0
A user typed in the command pwd and saw the following output: /home/jim/sales/pending. How could that user navigate to the /home/jim directory? a. cd .. b. cd /jim c. cd ../.. d. cd ./.
cd ../..
Linux is a _____ and _____ operating system.
multiuser, multitasking
The which command ________________. a. can only be used to search for executables b. searches for a file in all directories, starting from the root c. is not a valid Linux command d. searches for a file only in directories that are in the PATH variable
searches for a file only in directories that are in the PATH variable
Which of the following is not a type of RAID? firmware RAID serial RAID hardware RAID software RAID
serial RAID
What does the /var directory contain? a. various additional programs b. spools and log files c. temporary files d. files that are architecture independent e. local variance devices
spools and log files