Introduction to Linux I – Final Comprehensive Exam Answers 100% PDF file (Modules 1 – 27)

How to find: Press “Ctrl + F” in the browser and fill in whatever wording is in the question to find that question/answer.

NOTE: If you have the new question on this test, please comment Question and Multiple-Choice list in form below this article. We will update answers for you in the shortest time. Thank you! We truly value your contribution to the website.

  1. The _____ command displays information about the Linux kernel:
    • kern
    • uname *
    • real
    • linux
  2. A command can be: (choose three)
    • A program built-in to the shell *
    • A variable
    • A block
    • A configuration file
    • An alias *
    • A function *
  3. Which of the following are valid command lines? (choose two)
    • ls -l /etc *
    • ls -/etc
    • -l ls /etc
    • ls /etc -l *
  4. The [ ] characters around day in the example cal [-smjy13] [[[day] month] year] means that day is:
    • An option, not an argument
    • Required
    • An argument that must be “day” and nothing else
    • Optional *
  5. The syntax [-u|–utc|–universal] means:
    • These are required options
    • These three options are different
    • These three options mean the same thing *
    • This is invalid syntax
  6. If you want to delete a variable, you can run:
    • delete
    • unset *
    • clear
    • wipe
  7. Local variables are:
    • Only available to the shell they are created in *
    • Passed into other shells and commands
    • Are not a valid type of variable
    • Not used by shells at all
  8. Which of the following is a valid way to add the /data directory to the existing PATH variable?
    • PATH=$PATH:/data *
    • PATH=/data
    • $PATH=/data
    • $PATH=$PATH:/data
  9. To view all processes on the system, you can execute:
    • ps -f
    • ps –all
    • ps -e *
    • ps
  10. In order to run a command called “tough” in the background, you would type:
    • tough@
    • bg tough
    • tough& *
    • start -b tough
  11. To send a signal to a set of processes with the same name, you can run:
    • killall *
    • grpkill
    • allkill
    • sigkill
  12. Which of the following is not used for globbing?
    • #
    • *
    • ?
    • [
  13. The command echo ???a will display:
    • 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 have four characters in the file name.
    • All of the files in the current directory that end with an “a” character.
  14. Which of the following characters can be used to negate (indicate NOT matching the following characters), when placed as the first of a set of characters enclosed in square brackets [] ? (choose two)
    • ^
    • ~
    • ?
    • !
  15. Which command performs globbing?
    • The display command
    • The bash command *
    • The ls command
    • The echo command
  16. Which option(s) for the rm command can be used to delete directories that contain files? (choose two)
    • -R *
    • -D
    • -r *
    • -A
  17. Which character at the beginning of a long listing indicates a symbolic link?
    • d
    • l *
    • c
  18. The names of hidden files begin with the ___ character.
    • >
    • +
    • .
    • *
  19. Which option to the ls command will sort the output by size instead of alphabetically?
    • -s
    • -S *
    • -r
    • -t
  20. gzip and bzip are aliases for the same utility.
    True or False?

    • True
    • False *
  21. Which option to the bzip2 command can be used to report the compression ratio of an archive?
    • -R
    • -v *
    • -l
    • -c
  22. Which option to the bzip2 command can be used for recursive compression?
    • bzip2 doesn’t support recursive compression *
    • -R
    • -c
    • -v
  23. The dd command can be used to create large files the can be used as swap files.
    True or False?

    • True *
    • False
  24. The dd command can be used to copy entire partitions.
    True or False?

    • True *
    • False
  25. This stream is the output of a command operating normally:
    • stdout *
    • stdnorm
    • stderr
    • stdin
  26. Two or more commands combined with the “|” between them form a:
    • convoy
    • pipeline *
    • command line
    • caravan
  27. If you want to append a file with the normal output of a command, you can use:
    • 2>>
    • >>
    • >
    • 1>
  28. To send the normal and error output of a command to a single file, you can use:
    • &>
    • 1>
    • 2>
    • >
  29. Which command will merge two files together line by line?
    • join
    • merge
    • paste *
    • combo
  30. Which of the following is a non-interactive editor?
    • ed
    • sed *
    • vi
    • nano
  31. If you want a file to be displayed with its lines numbered, you can use:
    • fmt
    • cut
    • nl *
    • number
  32. To put the lines of a file in alphabetical order, you can run:
    • paste
    • sort *
    • cat
    • uniq
  33. The _____ command provides many options for formatting a file for printing.
    • format
    • header
    • print
    • pr *
  34. Which regular expression character matches any one character?
    • +
    • .
    • ?
    • *
  35. Which regular expression character matches zero or more of the previous character?
    • *
    • +
    • .
    • ?
  36. Which of the following regular expression characters is an extended regular expression character?
    • .
    • *
    • $
    • +
  37. The regular expression a? is equivalent to:
    • a{0,}
    • a{0,1} *
    • a{1,}
    • a{1}
  38. 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 slash in front of the character *
    • Use the fgrep command
  39. To navigate to the end of the line in vi command mode, you can press:
    • ^
    • #
    • *
    • $
  40. To move backward through a vi document, word by word, you press:
    • r
    • w
    • b *
    • c
  41. To save and then quit, you can type in command mode:
    • :q
    • :wq *
    • :WQ
    • :qw
  42. If you want to move a character to the left in vi command mode, you can press the left arrow key or:
    • j
    • h *
    • k
    • l
  43. If you want to move up a line in vi command mode, you can press the up arrow key or:
    • k *
    • l
    • h
    • j
  44. If a file has permissions that appear as rwxr-x—, what is the octal permission mode of the file?
    • 750 *
    • 740
    • 650
    • 760
  45. The only user with the capability to change the owner of a file is root.
    True or False?

    • True *
    • False
  46. 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?
    • Only the group owners
    • Both the user owner and group owners *
    • Only the user owner
    • Everyone
    • Nobody
  47. To switch to another group, you must:
    • Log off and log back in
    • Log in as the staff user
    • Be logged in graphically
    • Be a member of the group that you are switching to *
  48. The command, chmod 0777 /data will:
    • Make the /data directory a setuid directory
    • Make the /data directory a sticky bit directory
    • Remove all special permissions *
    • Make the /data directory a setgid directory
  49. Which of the following are mount options used for disk quotes? (choose two)
    • userquota
    • usrquota *
    • grpquota *
    • groupquota
  50. Which command produces a list of users of groups and their quota statistics?
    • quotarpt
    • repquota *
    • warnquota
    • quota
  51. Which command will remount the /data filesystem using the option from the /etc/fstab file?
    • mount -o mount /data
    • mount -o remount /dev/sda1 /data
    • mount -o remount /data *
  52. If a user has exceeded the block soft quota and the grace period has expired, what happens?
    • The soft limit becomes a hard limit until the user goes below the soft limit again *
    • The user will lose data, as files will be deleted automatically by the kernel.
    • The question is invalid because users cannot exceed block soft quota limits
    • Nothing, the user can still continue to use files as normal
  53. Which directories are typically writable to all users? (choose two)
    • /tmp *
    • /home
    • /var/tmp *
    • /
  54. To activate a swap space that has been initialized, you can execute:
    • swapoff
    • swapon *
    • swapcontrol
    • swapctl
  55. Which of the following commands will allow you to backup a partition table to a file and restore it at a later time?
    • ddisk
    • edisk
    • sfdisk *
    • pdisk
  56. Which of the following commands will allow you to add a physical volume to an existing volume group?
    • vgcreate
    • vgextend *
    • vgreduce
    • vgadd
  57. If the command you used to unmount a partition fails, which commands can you use to check what is keeping the partition busy? (choose two)
    • lsof *
    • chkdsk
    • partchk
    • fuser *
  58. What commands can display a list of mounted file systems? (choose two)
    • lspt
    • mount *
    • df *
    • fdisk
  59. The first field in the /etc/fstab file is used to specify:
    • The mount options
    • The dump level
    • The filesystem type
    • The device to mount *
    • The mount point
    • The fsck order
  60. The sixth field in the /etc/fstab file is used to specify:
    • The filesystem type
    • The device to mount
    • The mount point
    • The fsck order *
    • The mount options
    • The dump level
  61. Which of the following will mount an ISO file named cdrom.iso?
    • mount -t cdrom cdrom.iso /mntb
    • mount -t ufs cdrom.iso /mnt
    • mount -o loopback cdrom.iso /mnt
    • mount -o loop cdrom.iso /mnt *
  62. Which option to the du command shows a summary of the space used in a directory structure?
    • -s *
    • -h
    • -x
    • -all
  63. What determines how many files can be stored in a filesystem?
    • The number of bytes
    • The Superblock size
    • The number of inodes *
    • The number of data blocks
  64. Which of the following commands will display information about the Superblock? (choose two)
    • tune2fs *
    • init 0
    • superblk -a
    • dumpe2fs *
  65. The fsck utility uses which file to determine a filesystem type?
    • /etc/system
    • /etc/fsck
    • /etc/fstab *
    • /etc/fsck.config
  66. Which command will allow you to determine where the backup superblock is for a filesystem?
    • dumpe2fs *
    • e2fsck
    • fsck
    • superblk
  67. The output of the ls -l command includes “/etc/grub.conf -> ../boot/grub/grub.conf”. Based on this information, which is the soft link file?
    • ../boot/grub/grub.conf
    • /etc/grub.conf *
    • Neither
    • Both
  68. If you have 5 hard linked files and you delete four of them including the original one, then:
    • You lose the data from the file
    • The file still exists, but the data in the file is deleted
    • The hard link count goes to 0
    • The data is still available from the remaining file *
  69. What directory is used as a temporary mount point?
    • /mnt *
    • /tmpmnt
    • /etc
    • /xbin
  70. Which command needs to be executed after modifying the LILO configuration file?
    • reload
    • redo
    • modconfig
    • lilo *
  71. In GRUB Legacy, which directive is not typically used after a title directive? (choose one)
    • initrd
    • boot *
    • kernel
    • root
  72. The third stage of the boot process is:
    • The kernel phase *
    • The init phase
    • The firmware (BIOS/UEFI) stage
    • The Bootloader (LILO/GRUB) stage
  73. The bootloader (GRUB/LILO) loads which of the following components into memory? (choose two)
    • The root filesystem
    • The ramdisk *
    • The init process
    • The kernel *
  74. Which runlevel number defines multi-user with no networking services?
    • 3
    • 0
    • 1
    • 5
    • 2 *
    • 6
    • 4
  75. Which of the following commands can be used to reboot the system? (choose two)
    • shutdown
    • reboot *
    • halt
    • shutdown -r *
  76. What two differences are there between querying an installed RPM and an RPM package file with the rpm command? (choose two)
    • You must use the full filename when querying the package. *
    • You must use the full filename when querying the installed RPM.
    • To query the package file, you have to add the -p option. *
    • To query the installed RPM, you have to add the -i option.
  77. If you use the -f option when performing an rpm query:
    • The command will output a list of the files in the packages.
    • The command will display the full filename of the original package.
    • The command output will wrap at half screen width.
    • The command will show the package that owns a file. *
  78. If you you have a RPM package file named, figlet-1.1-0.3.i686.rpm, which rpm commands will install it? (choose two)
    • rpm -F figlet-1.1-0.3.i686.rpm
    • rpm -U figlet-1.1-0.3.i686.rpm *
    • rpm -i figlet-1.1-0.3.i686.rpm *
    • rpm -e figlet-1.1-0.3.i686.rpm
  79. The rpm2cpio command can be used to: (choose two)
    • Extract files from a “.rpm” file *
    • List the content of a “.rpm” file *
    • Build a binary “.rpm” file from a source “.src.rpm” file
    • Create a new “.rpm” file
  80. Which two directories are automatically searched for shared libraries? (choose two)
    • /usr/lib *
    • /lib *
    • /library
    • /usr/library
  81. Which command will remove all files that belong to a Debian package?
    • apt-get uninstall
    • apt-get purge *
    • apt-get remove
    • apt-get erase
  82. Which command will update the list of available packages for APT?
    • apt-get upgrade
    • apt-get update *
    • apt-cache update
    • apt-cache upgrade
  83. How can you determine the Debian package that owns a file?
    • dpkg -S *
    • dpkg -f
    • dpkg -o
    • dpkg -i
  84. Which command may be used to get a list of the installed Debian packages?
    • apt-get list
    • dpkg -L
    • apt-get show
    • dpkg -l *
  85. Which two commands will show detailed information about a Debian package? (choose two)
    • apt-cache show *
    • dpkg -s *
    • apt-cache info
    • dpkg -i
  86. Which command is used to display the shared libraries of a dynamically linked executable?
    • ldd *
    • ldlist
    • ldconfig
    • ld.so
  87. Which command will check the integrity of an RPM file?
    • rpm -qKp *
    • rpm -qCp
    • rpm -qcp
    • rpm -qkp
  88. Which two characters do you use to tell the command that you are finished providing options and that the remaining data on the command line is arguments?
    • **
    • &&
    • ||
  89. The _____ option to the uname command will display the kernel name.
    • -s *
    • -x
    • -n
    • -k
  90. Special file man pages are typically located in section ____.
    • 4 *
    • 2
    • 3
    • 1
  91. System Administration man pages are typically located in section ___.
    • 8 *
    • 6
    • 7
    • 9
  92. Shell command man pages are typically located in section ___.
    • 4
    • 1 *
    • 3
    • 2
  93. An absolute path always starts with which character?
    • ~
    • /
    • .
  94. Which file can you place in your home directory to be executed when you log off the system?
    • ~/.bashrc
    • /etc/bashrc
    • ~/.bash_profile
    • ~/.bash_logout *
  95. The _____ command will list the commands that are running in your terminal.
    • ls
    • ps *
    • proc
    • list
  96. To set a priority value lower than 0, you must log in as which user?
    • The root user *
    • Any user account
    • No user can specify a priority lower than 0
    • The adm user
  97. Which glob character matches “exactly one character”?
    • [
    • *
    • ?
    • .
  98. By default, using the touch command on an existing file will update the file’s _____.
    • Type
    • Permissions
    • Timestamp *
    • Ownership
  99. Which option to the find command will execute a command on each matching file without prompting the user?
    • -ok
    • -print
    • -ls
    • -exec *
  100. Which option to the find command will search by name using a case-insensitive match?
    • -inum
    • -insen
    • -iname *
    • -i
  101. Which of the following commands will take the standard output of the ls and put it into the /tmp/output.txt file:
    • ls | /tmp/output.txt
    • ls 2 | /tmp/output
    • ls 2> /tmp/output.txt
    • ls > /tmp/output.txt *
  102. The ____ option can be used with the edquota command to copy the quota limits from one user account to another.
    • -u
    • -c
    • -p *
    • -d
  103. A system that contains Linux as well as a Microsoft Windows operating system is called a:
    • Multi environment system
    • This sort of system cannot exist
    • Dual boot system *
    • A file base system
  104. In what directory are you most likely to find user’s home directories?
    • /home *
    • /usr/third
    • /var/lib
    • /usr/local
  105. Virtual memory is also referred to as:
    • Swap memory *
    • Test memory
    • Hard memory
    • Soft memory
  106. Which directory structure has directories which may have heavy activity for services like mail, ftp, httpd and printing?
    • /var *
    • /rootfs
    • /root
    • /home
  107. After running fdisk -cu /dev/sdb, what fdisk command will allow you to save changes and quit?
    • q
    • w *
    • f
    • g
  108. Which command is used to create a logical volume?
    • lvadd
    • createlv
    • create
    • lvcreate *
  109. Which option to the tune2fs command will change the space reserved for system use?
    • -M
    • -r
    • -R
    • -m *
  110. Which option to the du command will allow you to specify a subdirectory to not include in the results?
    • –exclude *
    • –noinclude
    • -e
    • -x
  111. Which option to the fsck command forces a system check?
    • -f *
    • -FF
    • -F
    • -ff
  112. Which option to the fsck command will allow you to specify the filesystem type?
    • -T
    • -f
    • -F
    • -t *
  113. Which option to the e2fsck command allows you to specify an alternative superblock?
    • -a
    • -d
    • -b *
    • -c
  114. Which type of link can be made to a file on another filesystem, hard or soft?
    • hard
    • soft *
  115. Which type of link can be made to directories, hard or soft?
    • hard
    • soft *
  116. When viewing a file with the ls -l command, which character represents a file type of soft link?
    • l *
    • d
    • f
  117. Which directory is used to store the kernel?
    • /kernel
    • /
    • /etc
    • /boot *
  118. Which directory is used to store temporary files?
    • /etc
    • /temp
    • /
    • /tmp *
  119. What is the full path to the LILO configuration file?
    • /boot/lilo.conf
    • /etc/lilo.conf *
    • /var/lilo
    • /etc/lilo
  120. To use an encrypted password in the GRUB Legacy configuration file, use the _____ option to the password directive.
    • –crypt
    • –secure
    • –encrypt
    • –md5 *
  121. The primary configuration file for the GRUB 2 on a Fedora system is _____.
    • /boot/grub/grub.cfg
    • /boot/grub2/grub.cfg *
    • /boot/grub2.cfg
    • /boot/grub/grub2.cfg
  122. The first process that the kernel launches is called the _____ process.
    • init *
    • startx
    • kernel
    • sys
  123. The program that first starts the boot process is called the _____.
    • boot
    • bootloader *
    • start
    • exec
  124. Which of the following are benefits of a shared library: (choose two)
    • Programs can be smaller *
    • Programs run faster
    • Programs use a more consistent base of code *
    • Programs run slower
  125. Which of the following contents is in the ldconfig configuration file by default?
    • include /etc/ldconfig
    • include ldconfig
    • include all
    • include ld.so.conf.d/*.conf *
  126. Which of the following commands would display the libraries used by the /bin/ls command?
    • ldd /bin/ls *
    • ls -lib /bin/ls
    • ldconfig /bin/ls
    • listlib /bin/ls
  127. The same set of services are started or stopped at different runlevels.
    True or False?

    • True
    • False *
  128. Which is the default runlevel for Debian based Linux systems?
    • 3
    • 2 *
    • 5
    • 4
  129. Which of the following is not a Linux boot system?
    • bootup *
    • init
    • upstart
    • systemd
  130. Which file is overwritten at the end of each boot process with the messages that were generated while booting?
    • /var/log/dmesg *
    • /var/log/dmsg
    • /var/msg/dmesg
    • /var/tmp/dmesg
  131. Which command is used to view the summary of the RAM and swap space?
    • lsmem
    • du
    • iostat
    • free *
  132. Coldplug devices are devices that are connected when the power is off.
    True or False?

    • True *
    • False
  133. Which of the following commands is used to view the network interface controller connected on the PCI bus?
    • lspci *
    • lsmod
    • lsusb
    • lsnet
  134. HALD is the abbreviation for:
    • Hardware Attribute Layer Daemon
    • Hardware Availability Layer Daemon
    • Hardware Abstraction Layer Driver
    • Hardware Abstraction Layer Daemon *
  135. What is the notification mechanism used to inform programs about a change in state of hardware devices?
    • HALD uses dbus to send notifications *
    • Programs query HALD directly
    • DBUS forwards queries from programs to HALD
    • DBUS sends notifications to HALD

Download PDF File below:


Related Articles

Leave a Reply

avatar

Send this to a friend