running a shell script every time you boot linux - GNU/Linux
Users browsing this thread: 2 Guest(s)
|
|||
---
i'm sure there's some sophisticated method for running a shell script at boot, but here's an easy alternative: open /etc/crontab in a text editor (you'll need root): $ sudo vim /etc/crontab add this line to the bottom: @reboot root /bin/bash /root/init.sh now, open /root/init.sh and put your shell script there. a word of warning: don't use the root user unless you need to. if you don't, create a new user and use it instead: $ useradd -g users -s /bin/(zsh|bash) username --- |
|||
Messages In This Thread |
running a shell script every time you boot linux - by archery - 03-01-2017, 10:43 PM
RE: running a shell script every time you boot linux - by wsaile - 04-01-2017, 12:08 AM
RE: running a shell script every time you boot linux - by hades - 04-01-2017, 10:10 AM
RE: running a shell script every time you boot linux - by jkl - 04-01-2017, 03:15 PM
RE: running a shell script every time you boot linux - by xero - 04-01-2017, 06:31 PM
|