Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I've recently opened a VPS running Ubuntu server 13.10 x86 (with no graphical desktop) in order to run a game server. Since it's a VPS there's a risk that the node may crash when I'm not watching. This means I may want to have the server execute this script automatically when the server boots. How can I do that? Another problem is that it seems to require a username and password after boot.

share|improve this question

To execute a script at startup of Ubuntu

  • Edit /etc/rc.local and add your commands
  • The script must always end with exit 0

More information : Executing a script at startup and shutdown

share|improve this answer
aww, fixing it now :) – DeaDSouL Jan 8 '14 at 20:36
Thanks. I'm guessing that "exit 0" will terminate the the script, which is not what i want to happen with my keep-alive script. Is this really needed as a startup script or can i just use ctrl + c instead? Also I still need a way to get past the login screen :) – Frederik A. Mikkelsen Jan 9 '14 at 10:40

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.