How do I set up automatic startup in Ubuntu ?

To set up automatic startup on Ubuntu, you can follow the steps outlined below:

  1. Open the terminal (Ctrl + Alt + T) and enter the following command to edit the startup file.
sudo nano /etc/rc.local
  1. You can add commands or scripts to the rc.local file to automatically run them at startup. For example, if you want to start an application at boot, you can add a command like the following:
/path/to/your/application &
  1. Save and close the file (press Ctrl + X, then press Y to confirm saving).
  2. Ensure that the rc.local file has execute permissions. You can use the following command to change the permissions:
sudo chmod +x /etc/rc.local
  1. After restarting the system, you will see the added commands or scripts automatically running at startup.

Please note that Ubuntu 16.04 and above versions utilize systemd as the system startup manager, allowing you to set up auto-start services using systemd. You can create a unit file to define the services you want to automatically run upon startup. For more detailed guidance on setting up auto-start using systemd, please refer to the systemd documentation.

Leave a Reply 0

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


广告
Closing in 10 seconds
bannerAds