Thursday, April 11, 2013

Scripts that are run at Linux Startup and Shell login

FOR LINUX:
Sometimes when you go into a shell, there are certain env variables that may be already set.  Or you may want to run something at boot or when you login to a new shell.

There are several places to put those commands:

At bootup:
/etc/rc.d/rc.local
/etc/rc.d/init.d/     - this file is execute for the user

At login (in this order) - these are in the $HOME dir of the user:
/home/oracle/.bashrc
/home/oracle/.bash_profile
/home/oracle/.bach_login
(also check if these files call another file, like /etc/bashrc or /etc/profile)

No comments: