If you are unsure how to stop, start or restart services on the Raspberry Pi system, follow this guide.
Stop, Start and Restart Services on Raspberry Pi OS
The “systemctl” and “service” are widely used system commands that allow users to stop, start or restart services on the system, including the Raspberry Pi.
However, before moving toward the commands, let’s find out the services running on our Raspberry Pi system through the following command:
Now, you can stop, start or restart the service you want to the Raspberry Pi system through below instructions.
Stop a Service on Raspberry Pi
If you want to stop a service running in the background to reduce the Raspberry Pi resource consumption, you should immediately use the following command to stop the service on the system.
Don’t forget to replace the “service_name”.
Or you can use the following command that performs a similar function:
To confirm the service is stopped on the Raspberry Pi system, you can use the following command:
Start a Service on Raspberry Pi
You can start the service anytime using the following command:
Or
Restart a Service on Raspberry Pi
If there is an error running a service on the system, hit the following command to reload or restart the service.
Or:
Enable Service on Raspberry Pi
To enable the service, simply issue the below-given command:
In this way, you can stop, start or restart any service on the Raspberry Pi system.
Conclusion
To stop, start and restart a service on Raspberry Pi, you can use the systemctl or service utilities. Both these utilities do the job a lot easier on the terminal. You need to find the service name using the “–status-all” command and execute the above commands to quickly stop, start, or restart the service on the Raspberry Pi system.