Faruque Ahmed : MCP, MCSA, MCSE, MCTS, MCIT, CCNA, OCA, OCP, GCP
[root@mail postfix]# netstat -lnp |grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 25792/master
Old vs. new tool
Deprecated Linux command and their replacement cheat sheet:
root@mail ~]# dig +short myip.opendns.com @resolver1.opendns.com
207.76.248.149
[root@mail ~]# curl https://ipinfo.io/ip ; echo
275.229.184.259
[root@mail ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 175.29.184.57 0.0.0.0 UG 100 0 0 em1
175.29.184.0 0.0.0.0 255.255.248.0 U 100 0 0 em1
192.168.9.0 0.0.0.0 255.255.255.0 U 101 0 0 em2
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
[root@mail ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 175.29.184.57 0.0.0.0 UG 0 0 0 em1
175.29.184.0 0.0.0.0 255.255.248.0 U 0 0 0 em1
192.168.9.0 0.0.0.0 255.255.255.0 U 0 0 0 em2
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
Netstat
netstat -nat [show ports allow]
netstat -ni [ show interface error]
netstat -r
netstat -i [Show the list of network interface]
netstat -ie [Display extended information on the interfaces]
Category
List of Unix and Linux commands
----