Auto-Start Ubuntu Services on Boot
To set the service to start automatically when the computer is turned on, you can follow these steps:
- Open the terminal and use the following command to view the currently installed services.
sudo systemctl list-units --type=service
- Find the service you want to set to start automatically at boot, and use the following command to enable auto-start:
sudo systemctl enable <service-name>
For instance, if you want to set up nginx service to start automatically when the computer boots up, you can use the following command:
sudo systemctl enable nginx
- Confirm that the service has been started and set to automatically start by using the following command:
sudo systemctl is-enabled <service-name>
For example, check if the nginx service has been set to start automatically.
sudo systemctl is-enabled nginx
You can configure services to start automatically on boot in Ubuntu by following the steps above.