Linux view ports are occupied
1, Lsof-i: Port number is used to view the occupancy of a port, such as viewing 8080 ports usage, lsof-i:8080
If you execute the lsof-i:8080 system prompt:-bash:lsof: Command not found, install lsof using yum install lsof such as: The installation is complete and then you can see the situation that was occupied by 8080
Lsof-i
Lsof Output Information Meaning:
COMMAND: The name of the process
PID: Process Identifier
USER: Process Owner
FD: File descriptor application identifies files through file descriptors
Type: File type
DEVICE: Specifies the name of the disk
Size: Sizes of files
Node: Index node
Name: Open the exact name of the file
Lsof-i: Port number
End process directly kill-9 process number.
2.NETSTAT-TUNLP |grep port number, view the process of the specified port number, view Port 22, NETSTAT-TUNLP |grep 22
Linux view ports are occupied