Linux basics: Linux Network basic configurations Ethernet connections in Linux, Ethernet interfaces are named eth0, eth1, etc, 0, 1 indicates the network card number. You can use the lspci command to view the hardware information of the network card (if it is a usb network card, you may need to use the lsusb command) ifconfig command (interface configuration) to view the interface information: $ ifconfig-a view all interfaces $ ifconfig eth0 view specified interface command ifup, ifdown is used to enable, disable an interface $ ifup wlan0 $ ifdown wlan0 network test command to test network connectivity: $ ping 192.168.1.1 $ ping baidu.com to test DNS resolution $ host www.baidu.com $ dig www.baidu.com to view the route table $ ip route to track the network path to the target address (Ubuntu installation $ sudo apt-get install traceroute) $ traceroute www.baidu.com use mtr for network quality testing (combined with traceroute and ping) $ mtr www.baidu.com Modify host name in real time host name: $ hostname shuangde permanently Modify host name/etc/hostname (Ubuntu ): directly modify the name/etc/sysconfig/network (RedHat): HOSTNAME = shuangde troubleshooting network troubleshooting from the bottom to the top, check whether the network configuration information is correct from the process itself to the external:-IP address-subnet mask-network management-DNS check whether the network management is connected to ping the network management IP address to check whether DNS resolution is normal: $ host www.baidu.com $ host www.douban.com