Introduction to Linux I Midterm Exam (Modules 1 – 14)

Last Updated on February 27, 2020 by Admin

Introduction to Linux I Midterm Exam (Modules 1 – 14) Answer

  1. Question ID 370

    Which command is used in order to view the manual page for a topic?

    • help
    • doc
    • show
    • man
  2. Question ID 371

    The basic form of a command line is:

    • command [options…] [arguments…]
    • command [arguments…] options
    • command arguments options
    • command [options…] arguments…
  3. Question ID 376

    A command can be:

    (choose three)

    • A block
    • A function
    • A program built-in to the shell
    • An alias
    • A configuration file
    • A variable
  4. Question ID 389

    Which of the following man page sections will provide an example of how a command is executed?

    • The DESCRIPTION section
    • The NAME section
    • The FILES section
    • The SYNOPSIS section
  5. Question ID 395

    The command man 5 passwd will:

    • Display the first five lines of the man page for the passwd command.
    • Not work; you can’t give a numeric argument to the man command.
    • Print the first five man pages that refer to the term passwd.
    • Display the man page of Section 5 for passwd.
  6. Question ID 402

    Which character(s) cannot be placed in variable names?

    • Hyphen (“-“) character
    • Numeric characters
    • Underscore (“_”) character
    • Upper-case alpha characters
    • Lower-case alpha characters
  7. Question ID 403

    Shell variables are used to:

    • Reboot the system
    • Prevent users from logging in
    • Hide passwords
    • Hold critical system information
  8. Question ID 404

    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
  9. Question ID 406

    Environment variables cannot be declared by which command?

    • export
    • declare
    • set
    • typeset
  10. Question ID 411

    The /usr/local/bin directory contains:

    • Essential administrative commands
    • Nothing; it is not a valid directory
    • The most fundamental commands that are essential for the operating system to function
    • Commands that have been compiled from local sources
  11. Question ID 428

    The key press combination that will request a running process terminate:

    • CTRL+c
    • CTRL+d
    • CTRL+z
    • CTRL+p
  12. Question ID 435

    A popular program for monitoring running processes in real-time is:

    • watcher
    • mon
    • ghost
    • top
  13. Question ID 437

    To send a signal to a set of processes with the same name, you can run:

    • killall
    • sigkill
    • allkill
    • grpkill
  14. Question ID 448

    Which of the following commands will stop all processes owned by the user bob?

    (choose two)

    • kill -u bob
    • pkill -u bob
    • kill -l
    • killall -u bob
  15. Question ID 464

    The range defined inside of square brackets is based on the:

    • ASCII text table
    • Invalid question as ranges are not permitted
    • ANSI text table
    • Standard text table
  16. Question ID 467

    You can combine glob characters in a single pattern, for example: a??*[0-9].

    True or False?

    • True
    • False
  17. Question ID 477

    The ls command can list the contents of only one directory at a time.

    True or False?

    • True
    • False
  18. Question ID 479

    To perform a “long listing” to show file details, use which of the following commands:

    • ls -L
    • ls -D
    • ll
    • ls -l
  19. Question ID 486

    The mv command can be used to move more than one file at a time.

    True or False?

    • True
    • False
  20. Question ID 489

    Which option(s) for the rm command can be used to delete directories that contain files?

    (choose two)

    • -r
    • -R
    • -D
    • -A
  21. Question ID 496

    Which character at the beginning of a long listing indicates a regular file?

    • c
    • d
    • l
  22. Question ID 512

    To decompress the archive example.gz, use the following command:

    • gunzip -x example.gz
    • gunzip example.gz
    • gzip -x example.gz
    • gzip -u example.gz
  23. Question ID 522

    By default, tar will attempt to extract an archive…

    • to the specified directory.
    • into the working directory.
    • into the user’s home directory.
    • into the archive’s parent directory.
  24. Question ID 525

    Which of the following options puts the cpio command into copy-in mode?

    • -o
    • -u
    • -v
    • -i
  25. Question ID 530

    The dd command can be used to create large files the can be used as swap files.

    True or False?

    • True
    • False
  26. Question ID 532

    Which of the following is not a valid argument for the dd command?

    • if
    • count
    • in
    • bs
    • of
  27. Question ID 537

    Which of the following are advantages of using the locate command?

    • It can search by file attribute types
    • It pages the results
    • Its results are always the most up to date
    • It is quicker than the find command
  28. Question ID 546

    Many commands that read text files will also read from this stream:

    • redirect
    • stdin
    • pipe
    • input
  29. Question ID 547

    If you want to overwrite a file by redirecting the output of a command, you can use:

    • &
    • }
    • >
    • |
  30. Question ID 548

    To redirect the errors that are output by a command, you can use:

    • 2@
    • 2&
    • 2>
    • @
  31. Question ID 550

    Which two symbols can effectively redirect stdin to a command?

    (choose two)

    • <
    • >
    • |
    • !
  32. Question ID 552

    To send the normal and error output of a command to a single file, you can use:

    • 2>
    • >
    • 1>
    • &>
  33. Question ID 555

    The head -n -1 readme.txt command will:

    • Display all but the last line of readme.txt
    • Number the lines of readme.txt
    • Show the first character of every line of readme.txt
    • Display the first line of readme.txt
  34. Question ID 556

    Why would you press CTRL+C when executing tail?

    • To capture the output into a file
    • To stop tail from following a file
    • To complete the processing of a file
    • To get tail to copy the text it is outputting
  35. Question ID 557

    Which command merges two files like related tables in a database?

    • sql
    • join
    • query
    • paste
  36. Question ID 562

    Which command will remove consecutive duplicate lines from a file?

    • unique
    • uniq
    • dup
    • dedup
  37. Question ID 568

    The _____ command provides many options for formatting a file for printing.

    • pr
    • format
    • header
    • print
  38. Question ID 570

    Which regular expression character matches zero or more of the previous character?

    • .
    • +
    • *
    • ?
  39. Question ID 572

    Which of the following regular expression characters is an extended regular expression character?

    • +
    • .
    • *
    • $
  40. Question ID 575

    The regular expression a* is equivalent to:

    • a{0,1}
    • a{1,}
    • a{1}
    • a{0,}
  41. Question ID 578

    To use regular expression characters to match themselves, you cannot:

    • Use the fgrep command
    • Put the character in the square brackets
    • Use the slash in front of the character
    • Use the backslash in front of the character
  42. Question ID 579

    What is NOT a purpose of using parentheses around parts of a regular expression?

    • They can be used to change the order that the pattern is evaluating
    • They can be used to refer back to what was matched
    • They can be used to make alternation more efficient
    • They can be used to group characters for repetition
  43. Question ID 587

    To navigate to the end of the line in vi command mode, you can press:

    • ^
    • *
    • $
    • #
  44. Question ID 593

    To search forward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for.

    • |
    • /
    • ?
  45. Question ID 597

    If you are in vi command mode and want to begin inserting text at the end of the line, you can type:

    • I
    • o
    • A
    • O
  46. Question ID 601

    If you want to move a character to the right in vi command mode, you can press the right arrow key or:

    • j
    • k
    • h
    • l
  47. Question ID 602

    If you want to move up a line in vi command mode, you can press the up arrow key or:

    • l
    • k
    • h
    • j
  48. Question ID 607

    Which permission is necessary on a directory in order for a user to use the cd command to change that directory?

    • Execute
    • None
    • Write
    • Read
  49. Question ID 609

    The setuid permission on a file:

    • Causes the file to run under the user’s identity
    • Causes the file to run under the owner’s identity
    • Causes the file to never run as root
    • Causes the file to always run as root
  50. Question ID 629

    The command, chmod 1777 /data will:

    • Make the /data directory a setgid directory
    • Make the /data directory a sticky bit directory
    • Make the /data directory a setuid directory
    • Remove all special permissions
  51. Question ID 632

    The command, chmod 2777 /data will:

    • Remove all special permissions
    • Make the /data directory a setuid directory
    • Make the /data directory a sticky bit directory
    • Make the /data directory a setgid directory
  52. Question ID 754

    Which are valid link types in Linux?

    (choose two)

    • Soft links
    • Stable links
    • Hard links
    • Filesystem links
  53. Question ID 763

    Which is true about hard links?

    • They can only be created by the root user
    • They share inodes
    • They are created with the ln -s command
    • They can be made to directories
  54. Question ID 772

    Which value represents the inode number in the following output of the ls -li command: 87589 -rw-r–r–. 2 root root 83 Mar 4 22:45 myhosts

    • 87589
    • 22:45
    • 2
    • 83
  55. Question ID 774

    The FHS sets which standard?

    • Which services should be installed
    • Which partitions should be created
    • Which directories should be used to hold specific files
    • Which filesystem types should be used
  56. Question ID 868

    The location of users’ default shells is stored in the ______ file.

    • /etc/group
    • /etc/gshadow
    • /etc/passwd
    • /etc/shadow
  57. Question ID 869

    Long command options are preceded by which two characters?

    • **
    • ||
    • &&
  58. Question ID 870

    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?

    • **
    • ||
    • &&
  59. Question ID 874

    To see a list of commands that are available while viewing a man page, you can type the __ character.

    • h
    • g
    • c
    • w
  60. Question ID 877

    System Administration man pages are typically located in section ___.

    • 6
    • 9
    • 8
    • 7
  61. Question ID 893

    What option to the kill command will list the signals for the system?

    • -r
    • -9
    • -l
    • -list
  62. Question ID 894

    Which glob character matches “exactly one character”?

    • *
    • .
    • [
    • ?
  63. Question ID 895

    Which glob character matches “zero or more characters”?

    • .
    • ?
    • [
    • *
  64. Question ID 896

    Which two characters match “a single character from a set of specified characters”?

    • []
    • ??
    • ..
    • **
  65. Question ID 904

    Which option to the find command will search by user owner?

    • -person
    • -user
    • -owner
    • -uowner
  66. Question ID 974

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

    • soft
    • hard
  67. Question ID 975

    Which type of link is easier to visually “see”, hard or soft?

    • hard
    • soft
  68. Question ID 976

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

    • hard
    • soft
  69. Question ID 982

    Which directory is used to store temporary files?

    • /etc
    • /tmp
    • /temp
    • /
  70. Question ID 985

    Which directory is used for the home directory of the root user?

    • /home/root
    • /
    • /var
    • /root