Web Design

Categorized | cli, System

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.

Author Profile

T4L ;

Other posts by

Author's web site



Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.


2 Comments

  1. Risame

    FINALLY!!!! A solution that works =D!!!!
    Been fighting with making a script that used sudo autorun at start following a lot of tutorials and none of them worked >.>
    Thanx again, you’re my hero xD

    1
  2. Alex

    Hi! How to remove same script from autostartup? )

    2

4 Trackback(s)

  1. 01 08 2009 : HowtoMatrix » Create an autostartup script for Debian and Ubuntu systems
  2. 03 08 2009 : X L A B » Blog Archive » Debian b?z?tu distribut?vu programmu autostarta skripts
  3. 08 08 2009 : How to setup startup scripts in Ubuntu « Linux & Stuff
  4. 07 02 2010 : ???? ????? ???? ??????? ?? ?????? ? ?????? | ????????

Leave A Reply

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