Whenever I login to my Linux server I'd like to have several commands run automatically (set some variables, change location, etc.)
This needs to be done on user login, not on system start.
How can I set it to do this?
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Put the commands in If you need commands to only run when logging in via ssh (but not when logging in physically), you could probably test for the presence of the | |||||||||||||
feedback
|
|
Just put this in ~/.bashrc or /etc/bash.bashrc if you want this for all users:
| ||||
|
feedback
|
man bash). – Andrew Schulman Nov 8 '11 at 9:39