Last Updated on February 9, 2016 by Admin
Introduction to Linux I Chapter 4 Exam Answer
-
Question ID 396
If you want to delete a variable, you can run:
- wipe
- clear
- delete
- unset
-
Question ID 397
To view all current variables, you can use:
- dump
- var
- view
- set
-
Question ID 398
To process a script file in the current context, you execute:
(choose two)
- .
- include
- source
- exec
-
Question ID 399
Environment variables can be viewed by running:
(choose two)
- export -e
- vars
- export -p
- env
-
Question ID 400
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
-
Question ID 401
Which of the following will create a variable?
- VAR+value
- VAR=value
- VAR value
- Var~value
-
Question ID 402
Which character(s) cannot be placed in variable names?
- Upper-case alpha characters
- Hyphen (“-“) character
- Underscore (“_”) character
- Lower-case alpha characters
- Numeric characters
-
Question ID 403
Shell variables are used to:
- Reboot the system
- Prevent users from logging in
- Hide passwords
- Hold critical system information
-
Question ID 404
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
-
Question ID 405
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
-
Question ID 406
Environment variables cannot be declared by which command?
- typeset
- declare
- export
- set
-
Question ID 408
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.
-
Question ID 409
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
-
Question ID 410
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
-
Question ID 411
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
-
Question ID 413
The path testdir/file.txt is:
- An invalid path
- A relative path
- A circular path
- An absolute path
-
Question ID 414
The path /data/file.txt is:
- A circular path
- An absolute path
- A relative path
- An invalid path
-
Question ID 417
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
-
Question ID 419
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
-
Question ID 420
Which of the following files is specific to each user and executed only during login?
- ~/.bash_profile
- /etc/profile
- /etc/bashrc
- ~/.bashrc
-
Question ID 421
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
-
Question ID 422
Which of the following files is for all bash shell users and executed only at login?
- ~/.bash_profile
- ~/.bashrc
- /etc/bashrc
- /etc/profile
-
Question ID 425
Which of the following commands will execute the last command that started with ec:
- !!
- !!ec
- !ec
- !-ec
-
Question ID 879
An absolute path always starts with which character?
- .
- /
- ~
-
Question ID 880
In the PATH variable, the __ character is used to separate the directories.
- :
- ;
- ~
- /
-
Question ID 881
The _____ command will allow you to see commands that you have previously executed.
- hist
- previous
- history
- last
-
Question ID 882
The _____ variable stores directories that the shell used to find executable files.
- CD
- DIR
- PATHS
- PATH
-
Question ID 883
When specifying a path, the __ character symbolizes the current directory.
- ..
- /
- ~
- .
-
Question ID 884
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
-
Question ID 885
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