Ch3 Configuring the Shell Exam
-
An absolute path always starts with which character?
/
~
\
.
-
Environment variables are:
- Only available to the shell they are created in
- Passed into other shells and commands
- Not used by shells at all
- Are not a valid type of variable
-
Environment variables can be viewed by running:
(choose two)
- vars
- env
- export -p
- export -e
-
Environment variables cannot be created by which command?
- declare
- set
- export
- typeset
-
If you want to delete a variable, you can run:
unset
clear
wipe
delete
-
In the PATH variable, the __ character is used to separate the directories.
~
;
/
:
-
Local variables are:
- Only available to the shell they are created in
- Are not a valid type of variable
- Not used by shells at all
- Passed into other shells and commands
-
Shell variables are used to:
- Reboot the system
- Hold critical system information
- Prevent users from logging in
- Hide passwords
-
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
-
The path
/data/file.txt
is:- An invalid path
- A circular path
- A relative path
- An absolute path
-
The PATH variable can be used under which situation?
- The command is not found.
- A full path name to a command is provided.
- The command is a function.
- The command is an alias.
-
The path
testdir/file.txt
is:- A relative path
- An absolute path
- An invalid path
- A circular path
-
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
-
The _____ variable stores directories that the shell used to find executable files.
- PATHS
- PATH
- DIR
- CD
-
The
/sbin
directory contains:- Essential administrative commands
- Commands that have been compiled from local sources
- The most fundamental commands that are essential
- Nothing; it is not a valid directory
-
The
/usr/local/bin
directory contains:- Nothing; it is not a valid directory
- Commands that have been compiled from local sources
- The most fundamental commands that are essential for the operating system to function
- Essential administrative commands
-
To process a script file in the current context, you execute:
(choose two)
source
.
include
exec
-
To view all current variables, you can use:
var
set
dump
view
-
When specifying a path, the __ character symbolizes the current directory.
~
..
.
/
-
Which character(s) cannot be placed in variable names?
- Underscore _ character
- Lower-case alpha characters
- Upper-case alpha characters
- Hyphen – character
-
Which file can you place in your home directory to be executed when you log off the system?
~/.bash_logout
~/.bashrc
~/.bash_profile
/etc/bashrc
-
Which of the following commands will execute the last command that started with
ec
:!!ec
!!
!-ec
!ec
-
Which of the following files is for all bash shell users and executed every time a bash shell is opened?
- ~/.bash_profile
- ~/.bashrc
- /etc/profile
- /etc/bashrc
-
Which of the following files is for all bash shell users and executed only at login?
- ~/.bashrc
- ~/.bash_profile
- /etc/profile
- /etc/bashrc
-
Which of the following files is specific to each user and executed every time a bash shell is opened?
- ~/.bash_profile
- /etc/bashrc
- ~/.bashrc
- /etc/profile
-
Which of the following files is specific to each user and executed only during login?
- ~/.bashrc
- ~/.bash_profile
- /etc/bashrc
- /etc/profile
-
Which of the following is a valid way to add the
/data
directory to the existing PATH variable?- PATH=/data
- PATH=$PATH:/data
- $PATH=/data
- $PATH=$PATH:/data
-
Which of the following will create a variable?
- variable+value
- variable=value
- variable value
- variable~value
Subscribe
0 Comments
Newest