Ethernet Connection
In Linux, the Ethernet interface is named: eth0,eth1, 0, 1 for network card number
The LSPCI command allows you to view the hardware information for your network card (if you are a USB card, you may need to use the LSUSB command)
Ifconfig command (interface configuration) to view interface information:
$ ifconfig-a View All interfaces
$ ifconfig eth0 View the specified interface
Command Ifup,ifdown to enable, disable an interface
$ ifup Wlan0
$ Ifdown Wlan0
Network Test command
Test network connectivity:
$ ping 192.168.1.1
$ ping baidu.com
Testing DNS Resolution
$ host Www.baidu.com
$ dig www.baidu.com
View the routing table
$ IP route
Track the network path to the destination address
(Ubuntu installation $sudo apt-get install traceroute)
$ traceroute www.baidu.com
Network quality testing using MTR (combined with traceroute and ping)
$ mtr www.baidu.com
Modify Host Name
Modify host name in real time:
$ hostname Shuangde
Permanently modify host Name
/etc/hostname (Ubuntu): Directly modify the name
/etc/sysconfig/network (RedHat): HOSTNAME = Shuangde
Troubleshooting
Network troubleshooting follows the process from bottom to top, from itself to the outside
Check that the network configuration information is correct first:
-ip Address
-Subnet mask
-Network Management
-dns
To see if the network management is connected
Ping Network Management IP address
To see if DNS resolution is normal:
$ host Www.baidu.com
$ host Www.douban.com
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/