Method 1: Use lsof command We can use the lsof command to check whether a port is open. The basic syntax is as follows: lsof -i:port number If there is no output, it means that the port number is not open. The following figure takes port 80 and port 53 as an example to check whether port 80 and port 53 are open You can also use the lsof -i command to directly output the open ports to check whether certain ports are open. Method 2: Use the netstat command The netstat command can provide network-related information about a host. We can check the open ports in linux using netstat -atu Netstat Flags We Use: -a, -t and -u Introduction -a: All sockets. -t : TCP connection of the program -u: UDP connection for the program You can also add the -p flag to display the associated PID of the process or program name. To display only UDP ports, you can use the following command: To display only TCP ports, you can use the following command: You may also be interested in:
|
<<: MySQL 5.7.17 installation and configuration tutorial under CentOS6.9
>>: jQuery plugin to implement search history
I searched on Baidu. . Some people say to use the...
Below, we introduce three ways to draw heart shap...
Preface Since many friends say they don’t have Ma...
Problem Description When filter attribute is used...
This article uses examples to illustrate the prin...
1. Download the virtual machine version 15.5.1 I ...
I searched for three-level linkage on the Interne...
MongoDB is a high-performance database, but in th...
1. Set and change the root password Check whether...
mysql master-slave configuration 1. Preparation H...
Table of contents Overview Virtual Dom principle ...
I recently encountered a strange thing when debug...
Copy code The code is as follows: <hr style=&q...
Table of contents 1. Introduction to NFS-Ganesha ...
Open the scheduled task editor. Cent uses vim to ...