Final Comprehensive Exam (Ch1-26)

  1. The two login types are:

    • CLI and GUI
    • URI and CLI
    • URI and CLU
    • GUX and CLI
  2. The location of users’ default shells is stored in the ______ file.

    • /etc/group 
    • /etc/passwd 
    • /etc/gshadow 
    • /etc/shadow
  3. Applications make requests to the kernel and receive resources, such as memory, CPU, and disk in return.

    True or False?

    • True
    • False
  4. Commands are interpreted by the shell and transformed into actions by the kernel.

    True or False?

    • True
    • False
  5. Which of the following are valid command lines?

    (choose two)

    • -l ls /etc
    • ls -/etc
    • ls /etc -l
    • ls -l /etc
  6. The _____ option to the uname command will display the kernel name.

    • -s
    • -k
    • -x
    • -n
  7. The ______ command will display your current working directory.

    • uname
    • pwd
    • exit
    • exec
  8. Shell command man pages are typically located in section ___.

    • 4
    • 2
    • 1
    • 3
  9. A pair of single quotes ‘ will prevent the shell from interpreting any special character.

    True or False?

    • True
    • False
  10. Environment variables can be viewed by running:

    (choose two)

    • vars
    • export -p
    • env
    • export -e
  11. Environment variables cannot be created by which command?

    • declare
    • typeset
    • export
    • set
  12. The path testdir/file.txt is:

    • A relative path
    • An absolute path
    • A circular path
    • An invalid path
  13. The /bin directory contains:

    • Commands that have been compiled from local sources
    • Nothing; it is not a valid directory
    • The most fundamental commands that are essential for the operating system to function
    • Essential administrative commands
  14. When specifying a path, the __ character symbolizes the current directory.

    • /
    • .
    • ~
    • ..
  15. Which of the following files is for all bash shell users and executed only at login?

    • ~/.bashrc
    • /etc/profile
    • ~/.bash_profile
    • /etc/bashrc
  16. Assuming at least one file matching the pattern is in the current directory, the command echo ???a will display:

    • All of the files in the current directory that have four characters in the file name with the first character being an “a” character.
    • Only a file named ???a
    • All of the files in the current directory that have four characters in the file name with the last character being an “a” character.
    • All of the files in the current directory that end with an “a” character.
  17. You can combine glob characters in a single pattern, for example: a??*[0-9].

    True or False?

    • True
    • False
  18. Which glob character matches zero or more characters?

    • ?
    • *
    • .
    • [
  19. Which two characters represent the empty string? 

    • “”
    • ..
    • &&
    • **
  20. Using the touch command and specifying a nonexistent file…

    • does nothing.
    • generates an error.
    • creates a blank file with that name.
    • prompts the user to create a file.
  21. To maintain timestamps when using the cp command, use:

    • -T
    • -a
    • -A
    • -t
  22. Which option for the rm command will cause it to prompt before deleting files?

    • -l
    • -p
    • -a
    • -i
  23. The mkdir command cannot be used to:

    • Create multiple directories at once
    • Create new directories
    • Create sub-directories in different parent directories
    • Delete a directory
  24. The names of hidden files begin with the ___ character.

    • >
    • +
    • .
    • *
  25. Which directory is used to store files representing attached devices?

    • /dev
    • /tmp
    • /mnt
    • /
  26. The _____ command will search for files using a database of all files, which is generated on demand or scheduled.

    • find
    • updatedb
    • search
    • locate
  27. Which option to the find command will search by file type?

    • -ftype
    • -file
    • -type
    • -fstype
  28. Which directory is used to store temporary files?

    • /
    • /tmp
    • /etc
    • /sysfs
  29. Which directory is used to store essential libraries?

    • /lib
    • /var
    • /bin
    • /usr
  30. Which command will remove consecutive duplicate lines from a file?

    • uniq
    • tr
    • dedup
    • sed
  31. Which of the following commands can be used to scroll through a text file?

    • sed
    • cat
    • less
    • head
  32. Which option of the head command will display only the first six lines of a file?

    (choose two)

    • -n -6
    • -n
    • -n 6
    • -6
  33. The regular expression a+ is equivalent to:

    • a{0,}
    • a{0,1}
    • a{1}
    • a{1,}
  34. To use regular expression characters to match themselves, you cannot:

    • Put the character in the square brackets
    • Use the backslash in front of the character
    • Use the fgrep command
    • Use the slash in front of the character
  35. Which regular expression character matches one or more of the previous character?

    • +
    • $
    • *
  36. If you are in vi command mode and want to begin inserting text at the end of the line, you can type:

    • I
    • A
    • o
    • O
  37. If you want to move up a line in vi command mode, you can press the Up Arrow Key ↑ or:

    • l
    • k
    • j
    • h
  38. To search forward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for.

    • /
    • |
    • ?
    • \
  39. Many commands that read text files will also read from this stream:

    • stdcon

    • stdout

    • stdin

    • stderr

  40. Which of the following commands will take the standard output of the echo command and put it into the /tmp/output.txt file:

    • echo 2> /tmp/output.txt
    • echo | /tmp/output.txt
    • echo 2 | /tmp/output
    • echo > /tmp/output.txt
  41. In a command pipeline, the output of one command is sent to another command as output. True or False?

    • True
    • False
  42. A signal is:

    • A command argument
    • A command option
    • A technique to send data to a process
    • A technique to tell a process to take some sort of action
  43. In order to run a command called cmd1 in the background, you would type:

    • bg cmd1
    • start -b cmd1
    • cmd1&
    • cmd1@
  44. Placing a ___ character at the end of the command line will put the command in the background.

    • B
    • !
    • &
    • ?
  45. The key press combination that will request a running process terminate:

    • CTRL+C
    • CTRL+D
    • CTRL+Z
    • CTRL+P
  46. To change the niceness value of an existing process, you can use the _____ command.

    • reset
    • nice
    • renice
    • set
  47. To execute a command called cmd1 as a foreground process, you would type:

    • cmd1
    • fg cmd1
    • cmd1 &
    • foreground cmd1
  48. To execute a command with the default priority, which value do you pass to the nice command?

    • 20
    • 0
    • -20
    • 19
  49. To execute a command with the highest possible priority, which value do you pass to the nice command?

    • -20
    • 20
    • 19
    • 0
  50. To see how long the system has been running, you can use the _____ command.

    • free
    • nice
    • uptime
    • ps
  51. To see the list of background processes that you have started in your shell, you can run:

    • work
    • process
    • jobs
    • list
  52. Which command will find all processes owned by user fred?

    • pgrep -u fred -l
    • ps -a | user fred
    • ps fred | grep -1 process
    • pgrep -i | fred
  53. The screen command can detach and re-attach terminal sessions.

    True or False?

    • True
    • False
  54. bzip2 archives are typically indicated with which file extension?

    • .gz
    • .bz2
    • .bz
    • .b2
  55. gzip and bzip are aliases for the same utility.

    True or False?

    • True
    • False
  56. The dd command can be used to copy entire partitions.

    • True
    • False
  57. The tar command supports:

    • gzip compression only
    • only uncompressed archives
    • bzip compression only
    • Both gzip and bzip2 compression
  58. The tar command supports which of the following styles of option(s)?​ (choose three)

    • GNU
    • DOS
    • BSD
    • Unix
  59. By default the gzip command replaces uncompressed files with compressed files.​ True or False?

    • True
    • False
  60. Which archiving method is compatible across Linux, Microsoft Windows and Mac operating systems?

    • tar
    • zip
    • cpio
    • dd
  61. Which of the following commands could be used to extract the archive, example.tar?

    • tar -xz example.tar
    • tar -uz example.tar
    • tar -xf example.tar
    • tar -uf example.tar
  62. Which of the following is not a valid argument for the dd command?

    • bs
    • of
    • if
    • in
  63. Which of the following options puts the cpio command into copy-in mode?

    • -v
    • -u
    • -o
    • -i
  64. Which option to the bzip2 command can be used for recursive compression?

    • -v
    • -c
    • -R
    • bzip2 doesn’t support recursive compression
  65. Which option to the bzip2 command can be used to report the compression ratio of an archive?

    • -R
    • -l 
    • -v
    • -c
  66. To view the contents of foo.gz without uncompressing it, use:

    • zcat foo.gz
    • gzip -i foo.gz
    • untar -u foo.gz
    • gunzip foo.gz
  67. Which command will uncompress the file letters.txt.xz?

    • unxz letters.txt.xz
    • untar letters.txt.xz
    • letters.txt.xz > letters.txt
    • xz -b letters.txt.xz
  68. Assuming everyone has access to the directory the file is in, who can view the contents of a file with permissions of rw-r----x?

    • Everyone
    • Only the group owners
    • Others
    • Both the user owner and group owners
    • Only the user owner
  69. For rwxr-x--x permission set, the highlighted permissions belong to:

    • The user owner and group owner of the file
    • The group owner of the file
    • All users besides the user owner and group owner
    • The user owner of the file
  70. For the rwxr-x--x permission set, the highlighted permissions belong to:

    • The user owner and group owner of the file
    • The user owner of the file
    • All users besides the user owner and group owner
    • The group owner of the file
  71. For the rwxr-x--x permission set, the highlighted permissions belong to:

    • The group owner of the file
    • All users besides the user owner and group owner
    • The user owner of the file
    • The user owner and group owner of the file
  72. The command,chmod 0777 /data will:

    • Remove all special permissions
    • Make the /data directory a sticky bit directory
    • Make the /data directory a setuid directory
    • Make the /data directory a setgid directory
  73. The command, chmod a+x will:

    • Add execute permission for all users
    • Add execute permissions for the user owner
    • Remove execute permissions for the user owner
    • Remove execute permission for all users
  74. The group ownership of a file may only be changed by:

    • Both the root user and the owner of the file
    • The owner of the file
    • The root user
    • Any user can change the group ownership of any file
  75. The setuid permission on a file:

    • Causes the file to never run as root
    • Causes the file to run under the user’s identity
    • Causes the file to run under the owner’s identity
    • Causes the file to always run as root
  76. Using the setgid permission on a directory:

    • Causes files existing in the directory to be owned by the group that owns the directory
    • Causes new files created in the directory to be owned by the group that owns the directory
    • Causes files existing in the directory to be made executable by the group
    • Causes the directory to be writable to members of the group that owns the directory
  77. Which command can change the user owner of a file?

    • own
    • chpawn
    • chown
    • pawn
  78. Which command is used to change permissions on a file?

    • chmod
    • chgmode
    • chgperm
    • chperm
  79. A soft link is also called a _____ link.

    • indirect
    • true
    • symbolic
    • false
  80. If you have a file named /tmp/hosts pointing to a file named /etc/hosts and the /etc/hosts file is deleted, then which of the following statements is true?

    • You can still access the data by using /tmp/hosts
    • The data from /etc/hosts is automatically copied into /tmp/hosts before /etc/hosts is deleted
    • It is not possible to delete the /etc/hosts file while a soft link is pointing to it
    • The /tmp/hosts file now points to nothing
  81. When viewing a file with the ls -l command, which character represents a file type of soft link?

    • d
    • f
    • l
  82. When you create a hard link, it increases the hard link count by one.

    True or False?

    • True
    • False
  83. Which type of link can be made to a file on another filesystem, hard or soft?

    • hard
    • soft
  84. Which type of link can be made to directories, hard or soft?

    • hard
    • soft
  85. Which type of link is indistinguishable by programs from regular files, hard or soft?

    • hard
    • soft
  86. Which value represents the inode number in the following output of thels -li command:

    87589 -rw-r--r--. 2 root root 83 Mar 4 22:45 myhosts 

    • 2
    • 83
    • 22:45
    • 87589
  87. What is the notification mechanism used to inform programs about a change in state of hardware devices?

    • Programs query HALD directly
    • DBUS sends notifications to HALD
    • DBUS forwards queries from programs to HALD
    • HALD uses dbus to send notifications
  88. Which of the following commands is used to view the network interface controller connected on the PCI bus?

    • lsusb
    • lsmod
    • lsnet
    • lspci
  89. The first stage of the boot process is:

    • The firmware (BIOS/UEFI) stage
    • The Bootloader (LILO/GRUB) stage
    • The init phase
    • The kernel phase
  90. The fourth stage of the boot process is:

    • The kernel
    • The Bootloader stage
    • The init phase
    • The firmware (BIOS/UEFI) stage
  91. The third stage of the boot process is:

    • The kernel phase
    • The firmware (BIOS/UEFI) stage
    • The Bootloader stage
    • The init phase
  92. Which directory is used primarily for storing log messages?

    • /var/tmp
    • /var/spool
    • /var/logging
    • /var/log
  93. Which of the following is not a daemon used for logging?

    • rsyslogd
    • klogd
    • syslogd
    • logd
  94. In GRUB Legacy, the _____ directive indicates an operating system to boot if the default operating system fails to boot.

    • fallback=
    • redo
    • root
    • timeout=
  95. In GRUB Legacy, the password directive in the title directive setting means:

    • You can’t place a password directive in the title directive setting
    • To edit any GRUB values, a password must first be entered
    • To boot a specific operating system, a password must be entered
    • The password must be entered to display a menu of operating systems that are bootable
  96. For traditional init, the _____ file is where the initial default runlevel is defined.

    • /etc/inittab
    • /etc/sysinit
    • /etc/init
    • /etc/initdefault
  97. What option to the who command will display the current runlevel?

    • -s
    • -a
    • -t
    • -r
  98. Which command is used to view the services that are set to start or stop automatically?

    • config
    • lsconfig
    • initconfig
    • chkconfig
  99. A device name of /dev/sda1 indicates this partition is on which type of device?

    • SATA
    • Logical Volume
    • IDE
    • CDROM
  100. Which directories are typically writable to all users?​ (choose two)

    • /var/tmp
    • /home
    • /
    • /tmp
  101. Which directory structure has directories which may have heavy activity for services like mail, ftp, httpd and printing?

    • /home
    • /rootfs
    • /var
    • /root
  102. After running fdisk -cu /dev/sdb, what fdisk command will allow you to delete a partition?

    • s
    • d
    • g
    • r
  103. After running fdisk -cu /dev/sdb, what fdisk command will allow you to list the current partition table?

    • p
    • s
    • w
    • l
  104. If you want to initialize swap space that you’ve just created, which command would you run?

    • mkswap
    • initswap
    • swapinit
    • swapon
  105. If you want to unmount a partition, which command should you use?

    • dismount
    • umount
    • mount
    • unmount
  106. The second field in the /etc/fstab file is used to specify:

    • The mount point
    • The fsck order
    • The device to mount
    • The dump field
    • The mount options
    • The file system type
  107. The sixth field in the /etc/fstab file is used to specify:

    • The dump field
    • The device to mount
    • The mount options
    • The mount point
    • The fsck order
    • The filesystem type
  108. What commands can display a list of mounted file systems? (choose two)

    • mount
    • fdisk
    • lspt
    • df
  109. The _____ command will display how much space a filesystem has free?

    • df
    • free
    • du
    • init
  110. What determines how many files can be stored in a filesystem?

    • The number of inodes
    • The number of bytes
    • The Superblock size
    • The number of data blocks
  111. Which option to the df command shows how many inodes are free in a filesystem?

    • -f
    • -i
    • -free
    • -inode
  112. Which option to the fsck command forces a system check?

    • -FF
    • -f
    • -F
    • -ff
  113. Which option to the fsck command will allow you to specify the filesystem type?

    • -F
    • -t
    • -T
    • -f
  114. How can you determine the RPM package that owns a file?

    • yum provides
    • yum info
    • yum owns
    • yum find
  115. In what directory are yum repository configuration files stored?

    • /etc/yum
    • /usr/share/yum
    • /etc/yum.repos.d
    • /var/lib/yum
  116. What are the correct options for the rpm command to display a list of all installed packages?

    • -qall
    • -b
    • -a
    • -qa
  117. Which command can an administrator run to rebuild the cache of shared libraries?

    • ldd
    • ld.so
    • ldlist
    • ldconfig
  118. Which of the following contents is in the ldconfig configuration file by default?

    • include all
    • include ldconfig
    • include /etc/ldconfig
    • include ld.so.conf.d/*.conf
  119. Which two directories are automatically searched for shared libraries? (choose two)

    • /usr/library
    • /library
    • /usr/lib
    • /lib
  120. A bare-metal hypervisor runs directly on top of physical hardware

    True or False?

    • True
    • False
  121. Container systems do not require:

    • communication with other parts of the system
    • security and updating
    • a hypervisor
    • dependencies needed for their specific applications
  122. Which of the following can be used to view details about USB devices?

    (choose two)

    • lsusb
    • usbprobe
    • lsmod
    • usb-devices
    • ls -usb
  123. Which programs have emerged to compete with and replace the traditional init process:

    (choose two)

    • Upstart
    • SysVinit
    • Systemd
    • initramfs
  124. What version of GRUB is the most modern version?

    • GRUB 3
    • GRUB Original
    • GRUB Legacy
    • GRUB 2
  125. Which of the following are valid Linux bootloaders?

    (choose two)

    • GRUB/GRUB2
    • UEFI
    • LILO
    • BIOS
  126. Which runlevel number defines multi-user with GUI?

    • 1
    • 4
    • 6
    • 5
    • 3
    • 0
    • 2
  127. Which runlevel number defines rebooting the system?

    • 3
    • 4
    • 2
    • 1
    • 6
    • 0
    • 5
  128. Which runlevel number is defined as user-definable?

    • 4
    • 5
    • 0
    • 2
    • 3
    • 1
    • 6
  129. What option to the fdisk command is used to display current partitions?

    • -f
    • -p
    • -l
    • -a
  130. Which command is used from the command line, to edit your disk’s partition table?

    • gedit
    • parttool
    • dedit
    • fdisk
  131. Which command is used to create a volume group?

    • createvg
    • create
    • vgcreate
    • vgadd
  132. Which command will display UUIDs?

    • blkid
    • displayid
    • setid
    • id
  133. Which two commands will show detailed information about a Debian package? (choose two)

    • dpkg -s
    • apt-cache show
    • apt-cache info
    • dpkg -i
  134. A _________ is a location that contains packages and metadata that can be used for queries, installation and updates of software on a system.

    • Repository
    • Depot
    • Store
    • Cache