Storage Boards Cleanup
To make it easier to find information about HPE Storage products and solutions, we are doing spring cleaning. This includes consolidation of some older boards, and a simpler structure that more accurately reflects how people use HPE Storage.
Disk Arrays
Showing results for 
Search instead for 
Did you mean: 

Execution of .login or .profile or .kshrc file

Regular Advisor

Execution of .login or .profile or .kshrc file

Hi Guys,
When we login to a system, the default shell is picked up from the /etc/passwd and then accordingly the default initiation files would be invoked, viz .profile for ksh and .login for csh. I have no doubt upto this.

Is there any trick by which I could get those initiation files automatically executed, every time I switch to another shell, so that I do not have set my environment manually.

Never say "Die"
Leif Halvarsson_2
Honored Contributor

Re: Execution of .login or .profile or .kshrc file


Create a file, .cshrc for csh, .shrc for sh and set your enviroment there. This files is executed for every new shell (but .login and .profile only at login).
In the .profile you also need to set:
ENV=$HOME/.shrc ; export ENV
T G Manikandan
Honored Contributor

Re: Execution of .login or .profile or .kshrc file

leif is right.

Use .cshrc,.kshrc and .shrc for respective shells.

The purpose of those shells are as what you are looking for.