Introduction to Bash Flashcards
The default shell in Red Hat Enterprise Linux is the…?
bash shell.
The bash shell can be used interactively, or as a….?
powerful scripting language.
Upon startup, bash executes commands found in the…?
~/.bashrc file, allowing users to customize their shell.
The bash shell maintains a history of the command lines that it executes. Command lines can be retrieved from the history using various history expansions that begin with….?
”!”
In Linux, the shell is the most commonly used program. The shell is what you see when you…?
log in or open a terminal, and is what you use to start most every command.
(Although there are a variety of different shells available, they all provide the same basic behavior: listen for commands from the user, start processes as specified in those commands, and report the results back to the user)
The most commonly used shell in Linux is the bash shell, which is the default shell in…?
Red Hat Enterprise Linux.
Shell scripts allow users to automate often repeated actions by combining a series of…?
commands.
Unlike interactive shells, shell scripts usually run a series of commands…?
non-interactively, and many of the features of the bash shell provide programming logic (such as branches or loops) for writing sophisticated scripts.
In practice, users seldom need to start a shell…?
manually. Whenever someone logs in, or opens a terminal, a shell is started automatically.
Occasionally, however, users would like to run a different shell, or another instance of the same shell. Because the shell is “just another” program, new shells can be launched from an existing shell. The new shell is referred to as a…?
subshell of the original shell.
When the subshell is exited, control is returned to the …?
original shell.
When starting a bash subshell, the apparent differences between the subshell and the parent shell are…?
minimal, and care must be taken to keep track of which shell you are in.
As part of its initialization, the bash shell will look for a file titled…?
.bashrc in a user’s home directory. This file is used to customize the bash shell.
(As the shell starts, commands listed in this file are executed as if they were entered on the command line. Technically, the bash shell “sources” the file. )
Interactive shells continuously repeat a cycle of listening for a…?
command line, evaluating the requested command and performing any requested actions, and displaying the results
The shell listens to the keyboard for input, and uses the RETURN key to recognize the…?
end of input.