Create an autostartup script for Debian and Ubuntu systems

In Debian-based distributions (and here I’m also talking about the widely-spread Ubuntu), there is no rc.local file preinstalled. The good thing is that you can make one easily so you can have a place to put commands to be started up automatically at boot. Here’s what you have to do:

sudo nano /etc/init.d/local.autostart

You can name the new file whatever you want, but in this example we’ll use local.autostart. Paste

#!/bin/sh

on the first line of the file and your command(s) underneath, one after the other. Now save and close and make the file executable with

sudo chmod +x /etc/init.d/local.autostart

Make the file be recognized as an init script:

sudo update-rc.d local.autostart defaults 80

Now, every time you boot up your Debian-based distribution, the commands you set in /etc/init.d/local.autostart will “magically” autostart.

Share:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Twitthis
This entry was posted in autostart, boot, bootup, cli, file, files, Syndicated, System. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree