# netstat -lntp # View listening port
# netstat -antp # View all established TCP connections.
Other command about viewing serv network information:
1, check the host name of Linux system: Linux learning,
# Hostname
Local host. Local domain
2. Check the IP address of the server:
# ifconfig | grep ' inet addr:' | grep-v ' 127 . 0 . 0 . 1 ' | cut-d:-F2 | awk ' { print $ 1 } '
192. 168. 17.238
192. 168. 1.9
3. Check the linux gateway:
# route |grep default
Default192.168.1.10.0.0 ug 000 em1
4, check the linux open service:
# chkconfig-list|grep enable # View open services
Sshd 0: Close 1: Close 2: Enable 3: Enable 4: Enable 5: Enable 6: Close.
Stat -s # View network statistics