Introduction to Linux II Chapter 1

Introduction to Linux II Chapter 1 Exam Answer

CCNA7.COM had tried to collect all chapter exam from candidate who has already taken exam.  There are 29 questions in Introduction to Linux II Chapter 1. Our team has modified and corrected all answers with 100% score before we published on this page. In Introduction to Linux II Chapter 1 exam, you should review all questions again and again before go to take online exam with NDG system.

  1. Question ID 1052

    Which of the following is a valid variable assignment?

    • 2=xyz
    • APP_VAR=’zero’
    • alpha-init=5
    • MY VAR= “set to one”
  2. Question ID 1071

    Shell variables are case insensitive.

    True or False?

    • True
    • False
  3. Question ID 1072

    Which of the following is NOT a valid variable name?

    • _LPIC
    • VAR_1
    • NEWVARIABLE
    • 2_VAR
  4. Question ID 1073

    A new environment variable can be “exported” and assigned a value with a single command.

    True or False?

    • True
    • False
  5. Question ID 1074

    Which of the following is NOT a valid command for variable declaration?

    • typeset –x ENV_VAR=1
    • export ENV_VAR=1
    • newvar –x ENV_VAR=1
    • declare –x ENV_VAR=1
  6. Question ID 1075

    The ___________ command is used to display the value of a specific variable.

    • value
    • var
    • echo
    • set
  7. Question ID 1076

    Which command can be used to display both local and environment variables?

    • export –p
    • declare –x
    • set
    • env
  8. Question ID 1077

    A variable once declared cannot be deleted.

    True or False?

    • True
    • False
  9. Question ID 1078

    Which command can be used to delete a variable?

    • rmvar
    • set -r
    • unset
    • declare
  10. Question ID 1079

    PATH variable directories are searched __________ when executing a command.

    • Left to right
    • Right to left
    • In no particular order
    • Including only the first 256 characters
  11. Question ID 1080

    Which of the following is NOT a valid option for executing a command that is not in the directories listed in the PATH variable?

    • By typing the absolute or relative path to the command
    • Rename the command and its directory
    • Add the directory containing the command to the PATH variable
    • Copy the command to a directory listed in the PATH
  12. Question ID 1081

    The command PATH=$PATH:/home/John does the following:

    • Creates a new PATH variable with only the /home/John directory as the value
    • Does nothing, because anything after the : is discarded
    • Appends the directory /home/John to the existing PATH variable
    • Replaces the existing directories in the PATH with the /home/John directory
  13. Question ID 1082

    Consider the following value of PATH variable: /bin:/usr/local/sbin:/home/joe/bin:/home/joe/test Joe modifies the my_scr.sh script, which is stored in the directory /home/joe/bin then places a copy of my_scr.sh in /home/joe/test. Executing my_scr.sh will:

    • Run the original version of the script in the /home/joe/bin directory
    • Check the timestamp and run the latest version of my_scr.sh
    • Not run at all, reports error
    • Run the new version of the script placed in /home/joe/test
  14. Question ID 1083

    The ___________ command can be used to check if the command already exists.

    • type
    • ex
    • check
    • command
  15. Question ID 1084

    Which of the following switches will include the full path in the prompt?

    • \W
    • \e
    • \H
    • \w
  16. Question ID 1085

    Defining the PS1 variable in an initialization file will make changes to the prompt persistent between logins.

    True or False?

    • True
    • False
  17. Question ID 1086

    If the command HISTIGNORE=’ls*’ is placed in the ~/.bash_profile file, which of the following commands would not be placed in the history list?

    • history
    • ls –la
    • cd
    • cat
  18. Question ID 1087

    Which of the following is NOT a purpose for creating an alias?

    • To create a short nickname for a long command or series of commands
    • To create “DOS-like” commands
    • To make them run faster
    • To include a command option by default
  19. Question ID 1088

    The command to remove an existing alias from the current shell is:

    • alias –d
    • unalias
    • unset alias
    • rmalias
  20. Question ID 1089

    The best way to group multiple commands and pass arguments is to:

    • Create an alias
    • Concatenate them
    • Use functions
    • Create an initialization file
  21. Question ID 1090

    A function accepts 3 arguments as input. The third argument of a function is identified as:

    • $arg3
    • $PATH
    • $3
    • $1
  22. Question ID 1091

    Changes in the __________ initialization file will affect all the users on the system.

    • Global
    • Local
    • Network
    • Shell
  23. Question ID 1092

    Local initialization files, by default, are stored in which directory?

    • /etc
    • User’s home directory
    • /usr
    • /bin
  24. Question ID 1093

    A Login BASH shell executes which of the following additional files (compared to an interactive BASH shell)?

    • /etc/profile and /etc/bashrc
    • /etc/profile and ~/.bashrc
    • /etc/profile and either ~/.bash_profile or ~/.bash_login or ~/.profile
    • ~/.bash_profile and ~/.bashrc
  25. Question ID 1094

    Administrators use the __________ file to create key environment variables and set key system values for every user.

    • /etc/bashrc
    • /etc/profile
    • /etc/config
    • .profile
  26. Question ID 1095

    Sourcing is an effective way to test initialization file changes. Which of the following is used to source a file?

    • touch command
    • ~ character
    • Either . character or the source command
    • None of the above
  27. Question ID 1096

    Which script is executed when you exit the shell?

    • /etc/bashrc
    • ~/.bash_profile
    • ~/.bashrc
    • ~/.bash_logout
  28. Question ID 1097

    Typical BASH exit scripts are found in ~/.bash_logout and __________ files.

    • /etc/bash_logout
    • ~/.bash_profile
    • /etc/bashrc
    • /etc/profile
  29. Question ID 1098

    Most of the Linux commands used by regular users can be found in which directory?

    • ~/bin
    • /usr/bin
    • /usr/local/sbin
    • /sbin

Comments

comments