LINUX

How to kill a process on a port on ubuntu

Remoted remoted 2021. 7. 25. 19:46

you can use

fuser -n tcp -k 9001

see more details in wikipedia

 

fuser (Unix) - Wikipedia

The Unix command fuser is used to show which processes are using a specified computer file, file system, or Unix socket. Example[edit] For example, to check process IDs and users accessing a USB drive: $ fuser -m -u /mnt/usb1 /mnt/usb1: 1347c(root) 1348c(g

en.wikipedia.org

 

 

fuser library 는 CentOS 에서는 이름이 다르다. 없다면 psmisc 로 package 를 설치하자