Is it possible to shutdown/restart the Mac completely (processes-wise)? My problem is that I'm having issues with terminating a service (pkill and kill are not doing the job, I don't know why), and if I shutdown or restart the computer, the processes are still running in the background.

The processes I'm talking about are catalina and tomcat - manually started Apache services.

  • 1
    Please be more specific about the processes in question. If you restart your computer, all processes do get killed and are restarted as needed. So if there are some specific processes which bother you we need to investigate what actually is executing them.
    – nohillside
    Mar 30, 2017 at 8:39
  • @patrix, I updated my post. Mar 30, 2017 at 8:42
  • If the tomcat etc tasks are setup correctly killing them should restart them
    – mmmmmm
    Mar 30, 2017 at 9:59
  • Are you asking how to shutdown the Mac or to stop certain processes (stopping process is not shutdown)
    – mmmmmm
    Mar 30, 2017 at 10:06

3 Answers 3


Two items are likely wrong:

  • ...the processes are still running in the background.
  • manually started apache processes

Both are probably not so. They have been restarted automatically. To prevent this,

  1. Try to kill the process by sending it the TERM signal

    sudo kill -15 {PID}
  2. Check if your services are restarted automatically by launchd

    launchctl list | grep tomcat

    If yes, unload e.g.

    sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysql.plist

The processes which you mentioned (catalina & tomcat) are not system services. These must have been set to start their daemon when these packages/services are installed and executed for the first time. Please refer this https://www.mulesoft.com/tcat/tomcat-start to get more information on how you can set it to run manually.


The way to do this is given in my answer here. However this is not a duplicate as the other question asks about GUI apps.

The command you need is shutdown

e.g. to reboot the machine immediately

sudo shutdown -r now

e.g. to shutdown the machine in 60 minutes

sudo shutdown -h +60

If tomcat and catalina are setup correctly then they will controlled by a launchd setup (or if less well done a Unix script) that will restart the process(es) when the machine starts up or the process is killed. So running kill on then does kill them but another process will start.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .