Skip to content

Kill a Process in WSL/Linux

Notes

  • Date Posted: May 21, 2021

Kill a Process in WSL/Linux

I ran into an issue where I was SSH’d into another machine running a process on a specific port. After leaving SSH on idle and it timing out, I reconnected into the machine and went to restart the process only to get the following error:

{
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '::',
  port: 4003
}

Killing an SSH connection does not kill the processes running on that machine. In order to free up the port, I ran the following commands.

Or you can simply restart your service/machine but that’s not fun. 🤓