See how much the FTP default port is
Sometimes we need to look at the default port for a service, it's good to do under Linux, no need to search the Internet, the direct view of the "/etc/server" file can meet the demand. There is a mapping between the port number and the service.
For example, we'd like to see the port that the IPP protocol uses by default is available through this command:
Cat/etc/service|grep IPP
View all ports that are open
Under Linux There are two commands, one is netstat, the other is SS.
Using Netstat is:
Netstat-tanp
where T represents a nested-section link for the TCP protocol, there are U (UDP), W (RAW), and X (UNIX) sockets in addition to T.
A represents all, and this so-called all refers to the port that includes the listening. At some point, some of the ports being opened are being transmitted, while others are just listening.
N: Display the port number directly instead of the service name corresponding to the "/etc/server" display port
P: Displays the process that occupies the port number.
L: Displays the port that is being monitored.
Close an end port
by NETSTAT-TANP to see which process a port is occupied by, and then through the "Killall process name" To kill the process is OK