9, Linux commonly used commands - Network Configuration Management

ifconfig -a // search ip information
ping -C 4 192.168.xxx.xxx // ping4 time
setup // ip to configure, firewall, and other services, you need root user to perform
ifconfig eth0 192.168.1.100 netmask 255.255.255.0 // temporarily set ip
vi / etc / sysconfig / network- scrippts / ifcfg-eth0 // permanently set ip
dhclient eth0 // enable dhcp mode
service network restart // restart the network services [STOP, Start]
service iptables STOP // turn off the firewall, [start] to open , [status] to view the status
hostname // View hostname
netstat -an // View all ports
lsof -i: 8080 // Check program run specific port number 12.
nmap port scan 10.1.252.121 //

Guess you like

Origin www.cnblogs.com/zengfh/p/12286541.html