&&
This is an AND list. If the command on the left side of && does execute successfully, then the command on the right side of && will execute.
.
Command used to re-execute a bash shell configuration file (.profile, .bashrc, etc.) after changes are made.
/etc/bash.bashrc
Systemwide configuration file read when a new shell starts. Contains variables, commands, and aliases common to all users.
/etc/profile
Systemwide bash configuration file read at login. Contains bash settings and environment variables common to all users.
A function is given 3 arguments as input. The third argument of a function is identified as:
$1
$3
$PATH
$arg3
$3
A login BASH shell executes which of the following additional files (compared to an interactive BASH shell)?
/etc/profile and either ~/.bash_profile or ~/.bash_login or ~/.profile
/etc/profile and ~/.bashrc
/etc/profile and /etc/bashrc
~/.bash_profile and ~/.bashrc.
/etc/profile and either ~/.bash_profile or
alias
alias and unalias utilities create or remove a nickname (shorthand term) for a command or series of commands.
Changes in the __________ initialization file will affect all the users on the system.
Local
Shell
Network
Global
Global
Defining the PS1 variable in an initialization file will not make changes to the prompt persistent between logins.
True or False?
True
False
False
env
Displays all environmental variables available to all shells.
export
With no arguments export displays all environmental variables available to all shells. export VARIABLE is used to export a locl variable.
function
Similar to an alias but for executing multiple commands. Typically used in bash shell scripts.
Once a variable is declared, it cannot be deleted.
True or False?
False
set
With no arguments set displays the values of all variables (local and environment) set in the current shell
source
Command used to re-execute a bash shell configuration file (.profile, .bashrc, etc.) after changes are made.
Sourcing is an effective way to test initialization file changes. Which of the following is used to source a file?
None of the above
The touch command
Either the period . character or the source command
The tilde ~ character
Either the period . character or the source command
The ___________ command can be used to check if a command already exists.
command
type
ex
check
type
The best way to group multiple commands and pass arguments is to:
Concatenate them
Use functions
Create an initialization file
Create an alias
Use functions
unset
Removes the variable from the current shell and subshells.
Which of the following is not a valid option for executing a command that is not in the directories listed in the PATH variable?
Add the directory containing the command to the PATH variable
Copy the command to a directory listed in the PATH
By typing the absolute or relative path to the command
Rename the command and its directory
Rename the command and its directory
Which script is executed when you exit the shell?
~/.bashrc
/etc/bashrc
~/.bash_profile
~/.bash_logout
~/.bash_logout
||
This is an OR list. If the command on the left side of || does NOT execute successfully, then the command on the right side of || is executed.
~/.bash_login
A bash user configuration file used to customize the shell environment. Sourced if ~/.bash_profile does not exist. Includes global variables not defined in /etc/profile.
~/.bash_logout
A bash user configuration file read at logout. Typically contains “clean up” commands such as clear to remove any text on the screen.