How do I restart a service in the terminal

I saw a post that says I can, to start a service go


sudo launchctl load -w /System/Library/LaunchDaemons/***.plist


so i start out with trying to print all the services in the system domain (I hope that's the right domain here) so i can find the one I want.


sudo launchctl print /System


And at that point I get lost, because the man page is just a lot of terminology to take in when all I want to do is understand what counts as a service and how to send "messages" to it. I wonder if there is a reference for people who have never ever installed xcode to help us?

Posted on Jun 10, 2022 3:13 AM

Reply
3 replies

Jun 10, 2022 4:18 AM in response to conradbraam

Whether you can send a message to them is dependent on what it is. You may be able to communicate with a daemon, but you wouldn’t do so with launchctl. That is for managing and some amount of inspection of the launch daemon items. Your syntax is wrong; use:

launchctl print system


If you know the name of the daemon, you may find information using the manual page in Terminal.


What service do you wish to send a message to, and what do you want to send.


Also, the load subcommand can still be used, but may not work going forward.

Jun 10, 2022 6:11 AM in response to Barney-15E

Ah, yeah this definitely got me moving again. I'm your typical Windows users, so I'm used to the plethora of simple commandline shells there, and the unix landscape is super daunting. Those links together with the explainer helped me find the service. Machine is without a display most of the time, so doing things over ssh has often been the preference for little tasks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I restart a service in the terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.