0

Is it possible to write a shell script that automatically starts running whenever i login to my unix terminal? Please provide any reference material

2 Answers 2

1

Add your script inside your .profile . .profile is executed whenever you log in. If a .profile currently doesn't exist in your home directory, create one!

Sign up to request clarification or add additional context in comments.

2 Comments

We are using putty to remote login. Can I modify my home directory in this case?
Even I use putty remote login. But your home directory has nothing to do with the way you log in. Just say cd $HOME from wherever you are. Create a new .profile there and add your script inside it
1

Depends on your shell. Assuming you are using bash, you can add the command to .bash_profile in your home directory.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.