View the port of the docker container

View the port of the docker container

sudo netstat -tulpn | grep docker
to view the specified port, you can combine the grep command:
netstat -ap | grep 80


Find the pid fuser 80/tcp used by the specified port

To close the program using this port, use kill + the corresponding pid
kill -9PID number

--------------------------------------------

Check which process or program occupies a certain port under Linux.

netstat -anp|grep 3306
kill -9 process number can end the process.

Guess you like

Origin blog.csdn.net/web18224617243/article/details/126616314