When a user logs in as a particular user, how do I make a terminal/shell immediately run a script?
I have a script which include some alias commands and I would like the script to run when a unique user account is run.
For reference I'm using Linux.
If you only want the script to run at login, then adding the bash commands or call to another shell script would go into .bash_profile as the first answer indicates. Depending on the Linux distro, you might have to create this file in your home directory.
If you want all process that launch after you login to have access to whatever shell script you wanted run at login time, those bash commands or call to another shell script should go into .bashrc.
Edit: (Based on question)
Make sure you create the .bash_profile in /home/you-home-directory (~).
To make sure it works, you could log out and back in or enter source .bash_profile.
You could always put a debug echo statement into .bash_profile, like echo "Running", and make sure you see that.
To make sure .bash_profile is in /home/your-home, ls -la ~/.bash_profile
Assuming the user is setup with bash shell, you can add the shell script to ".bash_profile" in the users home directory.