Linux Shell Configuration
A user is requesting that each time she logs in, a particular entry be written to a log file. This will only apply to her and she is using the Bash shell. In which configuration file would you make an entry for this action to take place.
*.profile*
All users at your site are using the Bash shell. You want to set a variable that will apply to every user and always have the same value. Which file would you place this variable in.
*/etc/profile*
Your default target on your Linux system is set to multi-user mode; however, you want the X Windows System to launch when you log into the system. Which file should you edit.
*~/.bash_login*
After a user starts a BASH session and the scripts in */etc/profile* are applied, what is the next file that could affect the shell session.
*~/.bash_profile*
Which of the following files would you use to create aliases that are applied when a specific user starts a BASH session.
*~/.profile, ~/.bashrc*
Which shell configuration file stores system-wide configuration commands and is used primarily to set environment variables and is used by the Login shell.
/etc/profile
What is the order login shells execute configuration scripts?
/etc/profile, ~/.bash_profile, ~/.bash_login, ~/.profile
What is the difference between a log-in and non-login shell?
A login shell requires authentication and runs in the CLI environment. A non-login shell is opened after a user has authenticated through a GUI login and opens a shell from the GUI.
Login Type
CLI
Non Login
From GUI
What shell type runs when the system starts and is using only the CLI as the user interface.
Login shells
What type of shell does not require a user to authenticate once they initially logged into the graphical environment.
Non-login shell
What shell(s) type runs when a shell session is opened from within the GUI.
Non-login shells
What are shell configuration files.
Scripts that execute when a shell starts or whenever you log out from the shell.
What determines which shell configuration files are executed.
Shell type
Which shell configuration file stores commands that execute when a user logs in and is used by the login shell.
~./bash_login
Which shell configuration file stores commands that execute when a user logs out and is used by the login shell.
~/.bash_logout
Which shell configuration file stores shell preferences for individual users and is used by the login shell.
~/.bash_profile
Which shell configuration file stores shell preferences for individual users and is used by the Non-login shell.
~/.bashrc
Which shell configuration file stores configuration preferences similar to /etc/profile, but for individual users and is used by the login shell.
~/.profile