Results 1 to 3 of 3
I have a bash file, I want that 1. whenever I reboot machine, this bash should run automatically. 2. Whenever a specific user logs in, it should run automatically. In ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-19-2009 #1
- Join Date
- Feb 2009
> Running a bash file on machine boot up or user login
1. whenever I reboot machine, this bash should run automatically.
2. Whenever a specific user logs in, it should run automatically.
In Short I want to know is there any place or folder (like Startup folder in Windows, ) where, if I put bash file, it will run automatically on rebooting machine.
- 02-19-2009 #2
- Join Date
- Jan 2006
What distribution are you using?
Most distributions have a rc.local or similar file where you can put commands you want run on boot. The exact name and location varies from disto to distro, but it will be somewhere in /etc
If you're using a graphical login, then you can put commands to be run on login in ~/.xinitrc if you're not using a graphical login, then you can put the commands in ~/.bashrc
Most desktop envirnments have a sessions or startup manager you can use to add startup scripts/commands/programs as well.
- 02-19-2009 #3
So in short, no there is no such thing as a start-up folder in most GNU/Linux distros. Most of us use boot scripts. Just like Darkrose mentioned.