105.1 Customize and Use the Shell Environment Flashcards
Describe the Interactive Login Shell
- Created when you log into a console
2. Created when logged in remotely via SSH
Describe the interactive Non-Login Shell
Created when a terminal application such as GNOME Terminal is started
/etc/profile
The first file read on a login session. Sets up system-wide environment variables, unmask values, Bash history controls, etc.
/etc/profile.d/
The directory that contains extra script configuration files for Bash. The /etc/profile file will read in the contents of this directory
/etc/bashrc
You can configure system-wide functions and aliases here
/etc/skel
The directory that contains the default .bash_profile, .bashrc, and other files that are added to a users home directory when an account is created on the system.
~/.bash_profile
This file can contain a users modified PATH environment variable and will source the ~/.bashrc file.This file can also be named ~/.profile on some distributions.
~/.bashrc
Local user command aliases and functions are defined here. This file sources the /etc/bashrc file.
~/.bash_logout
This file gets called on a user logout and can be used to shut down applications, display a message, or to perform other environment cleanup tasks.
~/.bash_login
This file gets called on a user login. Typically,.bash_profile and .bashrc are used instead of this file
What does the command env do
Command used to view environment variables for the current shell
What doe the command export do
Command used to allow child shell sessions to use an environment variable
What does the set command do
By itself, displays all Bash shell settings, variables and functions. Can also be sued to enable and disable Bash settings
What does the unset command do
Used to remove an environment variable and its value
What does the alias command do
used to create a shortcut to a longer command, typically with options