30.Discuss System wide shell configuration Scripts in Linux.
Ans.
1. These files determine the default environment settings of system shells and what functions are started every time a user launches a new shell.
2. Configuration files present in ‘/etc’ affects all shells used on the system.
3. An individual user can also set up a default configuration files in his or her home directory that affects only his or her shells.
4. Shell configuration scripts are ‘bashrc’, ‘csh.cshrc’, ‘zshrc’. ‘bashrc’ is read by bash, ‘csh.cshrc’ is read by tcsh; and zchrc is read by zsh.
5. These files are read every time a shell is launched, not just upon login, they determine the setting and behaviors of the shells on the system.
6. ‘/etc/profile’ this file is read by all shells except tcsh and csh upon login.
7. If we need to change the default path of your shell in ‘/etc/profile’ you can add another path statement in path manipulation section of ‘/etc/profile’.
8. Example:
We have created a ‘/songs’ on our system and want this directory in system search path, we can add the following line to the end of the similar lines:
Pathmunge /songs
Ans.
1. These files determine the default environment settings of system shells and what functions are started every time a user launches a new shell.
2. Configuration files present in ‘/etc’ affects all shells used on the system.
3. An individual user can also set up a default configuration files in his or her home directory that affects only his or her shells.
4. Shell configuration scripts are ‘bashrc’, ‘csh.cshrc’, ‘zshrc’. ‘bashrc’ is read by bash, ‘csh.cshrc’ is read by tcsh; and zchrc is read by zsh.
5. These files are read every time a shell is launched, not just upon login, they determine the setting and behaviors of the shells on the system.
6. ‘/etc/profile’ this file is read by all shells except tcsh and csh upon login.
7. If we need to change the default path of your shell in ‘/etc/profile’ you can add another path statement in path manipulation section of ‘/etc/profile’.
8. Example:
We have created a ‘/songs’ on our system and want this directory in system search path, we can add the following line to the end of the similar lines:
Pathmunge /songs
Comments
Post a Comment