How do I add a service to startup in Linux?

How do I add a service to startup in Linux?
Answer
How to run a Linux Program on Startup
  1. Run this command sudo nano /etc/systemd/system/YOUR_SERVICE_NAME.service.
  2. Paste in the command below. …
  3. Reload services sudo systemctl daemon-reload.
  4. Enable the service sudo systemctl enable YOUR_SERVICE_NAME.
  5. Start the service sudo systemctl start YOUR_SERVICE_NAME.
 

Tìm kiếm

Back
Top