2

How do you run a script when a user logs in? I have created a script script.sh and used chmod +x to make it executable where would I place the script to make it startup when a user logs in.

Jorge Castro
  • 73,717
Matt
  • 528

1 Answers1

4

The script ~/.profile is executed at each login, you can put your script here.

But be aware that if you login in two different virtual terminals, the script will be executed twice.

enzotib
  • 96,093