Home > Operation and Maintenance > Linux Operation and Maintenance > How to check whether the port is open in linux

How to check whether the port is open in linux

王林
Release: 2019-12-27 14:34:02
Original
7717 people have browsed it

How to check whether the port is open in linux

First open the Linux command operation interface, as shown in the figure (this article takes the Ubuntu system as an example):

How to check whether the port is open in linux

Then in order To obtain higher permissions (i.e. view all ports), switch to root user login

How to check whether the port is open in linux

Free online video tutorial sharing:linux video tutorial

Method 1: Use the lsof command, taking port 80 as an example, as shown in the figure:

How to check whether the port is open in linux

If there is no output, it means that the port number is not opened. In order to facilitate testing, this article detects an open port number, and the information shown in the figure will be output:

How to check whether the port is open in linux

Method 2: Use the netstat command, View all open port numbers

How to check whether the port is open in linux

The command shown in the figure below is to view all port numbers using the udp protocol in the system

How to check whether the port is open in linux

Related article tutorial sharing: linux tutorial

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template