Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service command on Mac OS X

Tags:

terminal

macos

I used to be able to execute on the Mac OS X (10.10.5) command line:

$ sudo service tomcat7 status

However, I must have accidentally deleted the package associated with service command and I am unable to find the name of the service package to reinstall. Any pointers would be greatly helpful.

I can't find service in either /sbin/ or /bin/ or /usr/sbin/

like image 474
Anil Gorthy Avatar asked Oct 04 '15 11:10

Anil Gorthy


People also ask

How do I find services on Mac OS X?

Open the app menu (to the right of the Apple menu ), choose Services, then choose a service.

What are services in macOS?

You may or may not have noticed a menu option for apps in macOS called Services. Services is something that will let you use a feature from another app – without having to open that app. So essentially, it is a way to access shortcuts that will allow you to do small tasks quickly.

How do I see what services are running on Mac Terminal?

Launch Terminal (Finder > Applications > Utilities). When Terminal is running, type top and hit Return. This will pull up a list of all your currently running processes.


1 Answers

I think you need launchctl.

sudo launchctl load /Library/LaunchDaemons/org.apache.tomcat.plist

See https://www.joel.lopes-da-silva.com/2008/05/13/installing-tomcat-on-mac-os-x/

like image 141
soegaard Avatar answered Oct 03 '22 01:10

soegaard