Take Another Quiz

Linux+ Networking Chapter 4

20 Questions
Linux Networking Quizzes & Trivia

Linux+ Networking Chapter 4

Questions and Answers
  • 1. 
    A directory is a type of file. True or False?
    • A. 

      True

    • B. 

      False

  • 2. 
    Which command would a user type on the command line to find out what directory in the directory tree he is currently in?
    • A. 

      Pd

    • B. 

      Cd

    • C. 

      Where

    • D. 

      Pwd

  • 3. 
    Which of the following is an absolute pathname?
    • A. 

      Home/resume

    • B. 

      C:\myfolder\resume

    • C. 

      Resume

    • D. 

      /home/resume

    • E. 

      C:home/resume

  • 4. 
    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

  • 5. 
    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

  • 6. 
    After typing the ls –a command, you notice that there is a file whose filename begins with a dot ( . ). What does this mean?
    • A. 

      It is a binary file.

    • B. 

      It is a system file.

    • C. 

      It is a file in the current directory.

    • D. 

      It is a hidden file.

  • 7. 
    After typing the ls –F command, you notice a filename that ends with an * asterisk character. What does this mean?
    • A. 

      It is a hidden file.

    • B. 

      It is a linked file.

    • C. 

      It is a special device file.

    • D. 

      It is an executable file.

  • 8. 
    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

  • 9. 
    The less command offers less functionality than the more command. True or False?
    • A. 

      True

    • B. 

      False

  • 10. 
    Which command searches for and displays any text contents of a binary file?
    • A. 

      Text

    • B. 

      Strings

    • C. 

      Od

    • D. 

      Less

  • 11. 
    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.

  • 12. 
    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

  • 13. 
    What will the following wildcard regular expression return: file[a-c]?
    • A. 

      Filea-c

    • B. 

      Filea, filec

    • C. 

      Filea, fileb, filec

    • D. 

      Fileabc

  • 14. 
    What will typing q! at the : prompt in command mode do when using the vi editor?
    • A. 

      Quit as no changes were made

    • B. 

      Quit after saving any changes

    • C. 

      Nothing as the ! is a metacharacter

    • D. 

      Quit without saving any changes

  • 15. 
    A user types in the command head  /poems/mary. What will be displayed to the terminal screen?
    • A. 

      The first line of the file mary

    • B. 

      The header for the file mary

    • C. 

      The first 20 lines of the file mary

    • D. 

      The last 10 lines of the file mary

    • E. 

      The first 10 lines of the file mary

  • 16. 
    The tac command _________________.
    • A. 

      Is not a valid Linux command

    • B. 

      Displays the contents of hidden files

    • C. 

      Displays the contents of a file in reverse order last word on the line first and first word on the line last

    • D. 

      Displays the contents of a file in reverse order last line first and first line last

  • 17. 
    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 ^.

  • 18. 
    Linux has only one root directory per directory tree. True or False?
    • A. 

      True

    • B. 

      False

  • 19. 
    Using wildcard metacharacters, how can you indicate a character that is NOT an a or b or c or d?
    • A. 

      [^abcd]

    • B. 

      Not [a-d]

    • C. 

      [!a-d]

    • D. 

      !a-d

  • 20. 
    • A. 

      Cd ..

    • B. 

      Cd /jim

    • C. 

      Cd ../..

    • D. 

      Cd ./.

Related Topics