Home >Operation and Maintenance >CentOS >How to check whether the port is open in centos

How to check whether the port is open in centos

王林
王林Original
2020-04-02 14:57:126112browse

How to check whether the port is open in centos

The specific method is as follows:

Method 1:

Use the telnet command. Telnet can be used directly on Windows. If used on Linux, Install it first (yum install -y telnet), and then use the following method to check whether the port is open

telnet ip port

Method 2:

Use the nc command. The nc command usually also needs to be installed (yum install - y nc) The command is

nc -v ip port

Method 3:

Use the firewall command that comes with centos7

firewall-cmd --query-port=port/tcp

Recommended related tutorials: centos tutorial

The above is the detailed content of How to check whether the port is open in centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn