Introduction to Linux I – Chapter 04 Exam Answers 2019 + PDF file

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. If you want to delete a variable, you can run:

  • wipe
  • clear
  • delete
  • unset

2. To view all current variables, you can use:

  • dump
  • var
  • view
  • set

3. To process a script file in the current context, you execute: (choose two)

  • .
  • include
  • source
  • exec

4. Environment variables can be viewed by running: (choose two)

  • export -e
  • vars
  • export -p
  • env

5. The PATH environment variable is used for:

  • Specifying locations that are writable for the user
  • Specifying directories to search for executable files
  • Specifying directories to contain documentation
  • Specifying locations where ordinary users can navigate

6. Which of the following will create a variable?

  • VAR+value
  • VAR=value
  • VAR value
  • Var~value

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

  • Upper-case alpha characters
  • Hyphen (“-“) character
  • Underscore (“_”) character
  • Lower-case alpha characters
  • Numeric characters

8. Shell variables are used to:

  • Reboot the system
  • Prevent users from logging in
  • Hide passwords
  • Hold critical system information

9. Local variables are:

  • Are not a valid type of variable
  • Passed into other shells and commands
  • Only available to the shell they are created in
  • Not used by shells at all

10. Environment variables are:

  • Only available to the shell they are created in
  • Are not a valid type of variable
  • Passed into other shells and commands
  • Not used by shells at all

11. Environment variables cannot be declared by which command?

  • typeset
  • declare
  • export
  • set

12. The PATH variable will be used under which situation?

  • The command is an alias.
  • The command is not found.
  • A full path name to a command is provided.
  • The command is a function.

13. The /bin directory contains:

  • 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
  • Essential administrative commands

14. The /sbin directory contains:

  • Commands that have been compiled from local sources
  • Nothing; it is not a valid directory
  • The most fundamental commands that are essential
  • Essential administrative commands

15. The /usr/local/bin directory contains:

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

16. The path testdir/file.txt is:

  • An invalid path
  • A relative path
  • A circular path
  • An absolute path

17. The path /data/file.txt is:

  • A circular path
  • An absolute path
  • A relative path
  • An invalid path

18. Which of the following is a valid way to add the /data directory to the existing PATH variable?

  • $PATH=$PATH:/data
  • PATH=$PATH:/data
  • $PATH=/data
  • PATH=/data

19. Which of the following files is specific to each user and executed every time a bash shell is opened?

  • ~/.bashrc
  • ~/.bash_profile
  • /etc/bashrc
  • /etc/profile

20. Which of the following files is specific to each user and executed only during login?

  • ~/.bash_profile
  • /etc/profile
  • /etc/bashrc
  • ~/.bashrc

21. Which of the following files is for all bash shell users and executed every time a bash shell is opened?

  • /etc/bashrc
  • /etc/profile
  • ~/.bashrc
  • ~/.bash_profile

22. Which of the following files is for all bash shell users and executed only at login?

  • ~/.bash_profile
  • ~/.bashrc
  • /etc/bashrc
  • /etc/profile

23. Which of the following commands will execute the last command that started with ec:

  • !!
  • !!ec
  • !ec
  • !-ec

24. An absolute path always starts with which character?

  • .
  • /
  • ~

25. In the PATH variable, the __ character is used to separate the directories.

  • :
  • ;
  • ~
  • /

26. The _____ command will allow you to see commands that you have previously executed.

  • hist
  • previous
  • history
  • last

27. The _____ variable stores directories that the shell used to find executable files.

  • CD
  • DIR
  • PATHS
  • PATH

28. When specifying a path, the __ character symbolizes the current directory.

  • ..
  • /
  • ~
  • .

29. Which file can you place in your home directory to be executed when you log off the system?

  • /etc/bashrc
  • ~/.bash_logout
  • ~/.bashrc
  • ~/.bash_profile

30. The _____ command will tell you if a command exists as a built-in command, function, alias or a command located within the PATH variable.

  • set
  • export
  • declare
  • type

Download PDF File below:


Related Articles

Leave a Reply

avatar

Send this to a friend