Site TIPS PAGE🔎 SEARCH  Ξ INDEX  MAIN MENU  UP ONE LEVEL
 OJB's Web Site. Version 2.1. Mac Tip.You are here: tip tips mac owen2 
Tip

Up to OJB's Mac Tips List

Terminal: Terminate a Process

Sometimes a process might need to be stopped. Maybe the force quit doesn't work or maybe the process is a background process which isn't shown in the list. In these cases the command line can be used to terminate the process.

CAUTION: don't terminate processes unless you really know what you are doing!

First you need to find out the process ID. To do this use the "ps" or "top" command. See the other tips in this section for information about these. Use "ps -axc" and find the process ID of the required process (its the number in the first column). Now use the kill command to terminate the process, type "kill x" where x is the number of the process to kill.

Often the process you want to kill doesn't belong to you so you will get an error message "Operation not permitted". To kill the process anyway use the "sudo" utility. Type "sudo kill x", and enter an administrator's password when asked. Check the process no longer exists by using ps again. Some system processes automatically restart after being terminated, but any problems should have been cleared by the restart. Occasionally a process won't respond to a standard kill, so use "sudo kill -9 x" instead.



I usually write a blog post about once a week. The latest post can be viewed here: But is it Science?: Ask yourself this: is it really science? (posted 2024-10-04 at 12:30:35).
Warning: mysqli_connect(): MySQL server has gone away in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 59

Warning: mysqli_connect(): Error while reading greeting packet. PID=31436 in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 59

Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 59

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /Library/WebServer/Documents/Owen2/Inc/Footer.inc.php on line 60
Could not connect to MySQL: