1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

Run a system command automatically at startup

Ubuntu Documentation


Run a system command automatically at startup

Sometimes it can be useful to add a custom command to the startup process so that your computer executes it on every boot. To do this:

  • Edit the crontab with administrative privileges (see the section called "Root And Sudo"):

    sudo crontab -e
  • Insert the following line:

    @reboot /home/user/command


    Replace /home/user/command with the full address to your command.

  • Save the file and exit.

* License

* Ubuntu Desktop Guide Index

  1. About.com
  2. Technology
  3. Linux
  4. Linux Distributions
  5. Popular Linux Distros
  6. Ubuntu
  7. Ubuntu Documentation
  8. Ubuntu - Run a System Command Automatically at Startup

©2014 About.com. All rights reserved.