Run a system command automatically at startup

Sometimes it can be useful to run a custom command whenever your computer starts up. To do this:

  1. Edit the crontab with administrative privileges (see Chapter 2, Administrative Tasks):

    sudo crontab -e
  2. Insert the following line:

    @reboot /home/user/command
    [Note]

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

  3. Save the file and exit.