HowTo: Use ps, kill, nice, and killall To Manage processes in FreeBSD and OS X Unix Operating System

Here are some common tasks for managing processes in FreeBSD and OS X Unix operating system using the ps, kill, nice, and killall commands:

  1. List running processes:
ps aux
  1. Kill a process by PID:
kill [pid]
  1. Change the priority of a process:
nice -n [priority] [command]
  1. Kill all processes with a specific name:
killall [process name]

Note: ps shows information about the running processes, including their PID and the command used to start them. kill sends a signal to a process to terminate it. nice changes the priority of a process, where a lower number indicates a higher priority. killall terminates all processes with the specified name.

Keep in mind that using these commands requires superuser privileges in most cases.

Leave a Comment