How do I manually kill a process on my Linux server?

  • Post category:SSH
  • Post comments:0 Comments

Log into your server as the root user and find the process PID that you wish to kill. You can do that by issuing the ps command with the aux options. See example below.

ps aux

This will display a process list and each visible process should have a line similar to the one below.

username 31262 0.0 0.0 12168 1752 ? S 00:25 0:00 somecommand

The second number is the PID. Once you have the PID you can issue the kill command as follows.

kill 31262

If the process doesn’t stop you can add the -9 option to issue a SIGKILL to the command. This should stop the process.