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 ...
- 02-19-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 1
> Running a bash file on machine boot up or user login
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 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 #2Linux User
- Join Date
- Jan 2006
- Posts
- 414
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.


Reply With Quote