Traditional Culture Encyclopedia - Weather inquiry - How does linux view services and ports?
How does linux view services and ports?
The netstat command is used to display statistical data related to IP, TCP, UDP and ICMP protocols, and is generally used to check the network connection of each port of this machine.
-a? Displays a list of all valid connection information (including established connections and connections listening for connection requests).
-n? Displays all valid connections that have been established.
-t? Tcp protocol
-What about you? Udp protocol
-Me? Inquire about the program you are listening to.
-p? Displays the program ID and program name of the socket being used.
Example: netstat? -ntupl|grep? Process name
How to query only tomcat's connection?
netstat? -na|grep? ESTAB? |grep? 80? wc-l
netstat? -na|grep? ESTAB? |grep? 8080? wc-l
Introduction of common ports:
Port: 2 1
Service: the port opened by FTP server for uploading and downloading.
Port:? 22
Service: ssh
Port:? 80
Service: HTTP? Used for web browsing.
Port: 389
Service: LDAP? ILS? Lightweight directory access protocol and NetMeetingInternet? Locator? Computer network server
Port: 443
Service: Web browsing port? Another HTTP can provide encryption and transmission through a secure port.
Port: 8080
Service: proxy port
Open the terminal and execute the following command to check the port occupation of each process:?
#? ps? -ef|wc? -Me? //View the total number of processes running in the background?
#? ps? -Fu? csvn? //View csvn process
#? netstat? -lntp? //See which ports are open.
#? netstat? -r? //This option can display information about the routing table.
#? netstat? -a? //This option displays a list of all valid connection information.
#? netstat? Grep exam? 8080
#? netstat? -na|grep? -Me? Listen. //You can see the port number that the system is currently listening to.
#? netstat? -Antoine? //View the established connection process and occupied ports.
netstat? -anp|grep 1487
lsof? -Me: 1487?
- Previous article:The weather in Tushan, Japan
- Next article:Which is more terrifying, global warming or global cooling?
- Related articles
- Bad to the bone, the meanest and funniest thing is a lot of signatures
- What are the rainy days predicted by frontal cyclones in the northern and southern hemispheres?
- Read the sunset diary
- Does Du influence Wuhan?
- The weather performance of Meiyu Peak mainly includes
- Instructions for heatstroke prevention and cooling at high temperature in construction site (5 practical articles)
- Which province in New Zealand is tekapo from?
- Where is the rape flower in Bailuyuan? What time does it open?
- 20-day weather forecast in Lu Yi
- Is it cold in Shandong?