Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to do this so when I reboot my linux server the process will reopen on startup?

share|improve this question

migrated from Oct 2 '11 at 10:39

This question came from our site for professional and enthusiast programmers.

up vote 8 down vote accepted

Usually, you need to add a startup script in /etc/rc.d/ or /etc/rc.local. Thats how all daemons are started. However you need to have root permissions for this.

Since you tagged it as ssh, I guess you don't have root permissions. So you can create a crontab entry that runs a script to launch your process after every reboot:

$ crontab -e

Add the following line in the file that opens up:

@reboot  /path/to/ 
share|improve this answer
Good Idea. I will try that. After adding the cron, how would I remove it if needed to. – David Meyer Oct 2 '11 at 6:28
Same as before. crontab -e and delete that line from the file – jman Oct 2 '11 at 6:29
When trying the command crontab -e it respods "no crontab for (myusername)" How do I make one? – David Meyer Oct 2 '11 at 6:50
Strange, it should create one (after complaining) if there isn't any. What version of linux are you on? – jman Oct 2 '11 at 6:56
Basic 64-bit Amazon Linux AMI 2011.09 – David Meyer Oct 2 '11 at 6:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.