In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "linux system how to use netstat commands", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "linux system how to use netstat commands" this article.
The Netstat command is used to display a variety of network-related information, such as network connections, routing tables, interface status (Interface Statistics), masquerade connections, multicast members (Multicast Memberships), and so on.
Common parameters
-a (all) shows all options, default does not show LISTEN related-t (tcp) shows only tcp related options-u (udp) shows only udp related options-n refuses to display aliases and can show that all numbers are converted to numbers. -l lists only the status of the service in Listen (monitoring)
-p displays the name of the program that establishes the relevant link-r displays routing information, routing table-e shows extended information, such as uid, etc.-s carries out statistics according to each protocol-c executes the netstat command at regular intervals.
Tip: the status of LISTEN and LISTENING can only be seen with-an or-l
Practical command example
\ 1. List all ports (both monitored and unmonitored)
\ 2. List all Sockets that are in the listening state
Only the listening port netstat-l is displayed
List only all listening tcp ports netstat-lt
List only all listening udp ports netstat-lu
List only all listening UNIX ports netstat-lx
\ 3. Display statistics for each protocol
Display statistics for all ports netstat-s display statistics for TCP or UDP ports netstat-st or-su
4. Display PID and process name netstat-p in netstat output
\ 5. Do not display host, port and user name (host, port or user)
When you don't want the host, port and user name to be displayed, use netstat-n. Numbers will be used instead of those names.
\ 6. Continuously output netstat information
Netstat will output network information every other second. Netstat-c
\ 7. Display core routing information netstat-r
\ 8. Find out the port on which the program runs
Not all processes can be found, those without permissions will not be displayed, and use root permissions to view all the information.
Netstat-ap | grep ssh
Commonly used:
Netstat-nat lists all tcp ports
The above is all the contents of the article "how to use netstat commands in linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.