Ch2 Using the Shell Exam

  1. Which command will send text to the terminal display:

    • echo
    • type
    • show
    • print
  2. To display your current location within the filesystem, you can type:

    • dir
    • whereami
    • cwd
    • pwd
  3. The _____ command displays information about the Linux kernel:

    • kern
    • linux
    • real
    • uname
  4. A command can take the form of:

    (choose three)

    • A block
    • A configuration file
    • A function
    • A variable
    • An alias
    • A program built-in to the shell
  5. Which of the following are valid command lines?

    (choose two)

    • ls /etc -l
    • ls -l /etc
    • ls -/etc
    • -l ls /etc
  6. You want to execute the ls command with two options: -r and -l. Which of the following are valid ways to run this command:

    (choose three)

    • ls -r -l
    • ls -rl
    • ls -l -r
    • ls --r --l
    • ls rl
    • rl ls
  7. You can pass arguments to long options by using which of the following techniques:

    (choose two)

    • –option argument
    • –option=argument
    • –option~argument
    • –option{argument}
  8. When typing a command, you can have the bash shell complete the command by pressing which key?

    • The Tab key
    • The Up Arrow key
    • The Backspace key
    • The Enter key
    • The Del key
  9. Long command options are preceded by which two characters?

    • ||
    • &&
    • --
    • **
  10. 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?

    • --
    • &&
    • **
    • ||
  11. The _____ option to the uname command will display the kernel name.

    • -k
    • -s
    • -x
    • -n
  12. Which command is used in order to view the manual page for a topic?

    • man
    • doc
    • -x
    • show
    • -m
  13. The ______ command will display your current working directory.

    • exit
    • exec
    • uname
    • pwd
  14. The command manual ls will provide detailed information about how the ls command functions.

    True or False?

    • True
    • False
  15. Which of the following man page sections will show the syntax for how a command should be executed?

    • The DESCRIPTION section
    • The NAME section
    • The FILES section
    • The SYNOPSIS section
  16. The [ ] characters around day in the example cal [-smjy13] [[[day] month] year] means that day is:

    • An argument that must be “day” and nothing else
    • Required
    • Optional
    • An option, not an argument
  17. The syntax [-u|--utc|--universal] means:

    • This is invalid syntax
    • These are required options
    • These three options are different
    • These three options mean the same thing
  18. The command man 5 passwd will:

    • Print the first five man pages that refer to the term passwd.
    • Not work; you can’t give a numeric argument to the man command.
    • Display the man page in Section 5 for passwd.
    • Display the first five lines of the man page for the passwd command.
  19. To see a list of commands that are available while viewing a man page, you can type the __ character.

    • h
    • w
    • g
    • c
  20. To search for something while viewing a man page, you first type a __ character.

    • /
    • <
    • >
    • |
  21. Special file man pages are typically located in section ____.

    • 4
    • 2
    • 1
    • 3
  22. System Administration man pages are typically located in section ___.

    • 9
    • 6
    • 7
    • 8
  23. Shell command man pages are typically located in section ___.

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

    True or False?

    • True
    • False
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments