Home > Article > Backend Development > ubuntu checks the programs occupying a certain port
To view port usage, use the netstat command.
View the connected service ports (ESTABLISHED)
netstat -a
View all service ports (LISTEN, ESTABLISHED)
netstat -ap
To view the 8080 port, you can combine it with the grep command:
netstat -ap | grep 8080
If you want to view the 8888 port, enter in the terminal:
lsof -i:8888
To stop the program using this port, use kill + the corresponding pid