Why do we have shell initialization files?
The Unix shell needs to set several variables to function correctly. Important variables like PATH are set or modified here. The user may add some convenient settings such as the prompt to be displayed, in his own initialization files. These will be persistent settings in the sense that they will be loaded every time a new shell is spawned.
System-wide configuration files vs. Per user files
Typically there are two versions of each file. E.g. we have /etc/bashrc which applies to all users and can be changed only by the administrator, and we have ~/bashrc which can be set up by the individual user in his home directory.
Login shell vs. non-login shell
Files read by sh upon startup
Files read by bash upon startup
Files read by ksh upon startup
References -
Solaris Advanced User's Guide: Modifying Initialization Files
http://docs.oracle.com/cd/E19683-01/806-7612/customize-4/index.html
The Unix shell needs to set several variables to function correctly. Important variables like PATH are set or modified here. The user may add some convenient settings such as the prompt to be displayed, in his own initialization files. These will be persistent settings in the sense that they will be loaded every time a new shell is spawned.
System-wide configuration files vs. Per user files
Typically there are two versions of each file. E.g. we have /etc/bashrc which applies to all users and can be changed only by the administrator, and we have ~/bashrc which can be set up by the individual user in his home directory.
Login shell vs. non-login shell
Files read by sh upon startup
Files read by bash upon startup
Files read by ksh upon startup
References -
Solaris Advanced User's Guide: Modifying Initialization Files
http://docs.oracle.com/cd/E19683-01/806-7612/customize-4/index.html
No comments:
Post a Comment