In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about how to view the physical information of the network card in Linux. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
The network card in Linux is marked as eth. The first network card is called eth0, the second is called eth2, and so on.
Use the lspci or lsusb command to view the physical information of the network card
The command ifconfig is used to view the network card information
Ifconfig-a
Ifconfig eth0
Lo Interface (loopback)
Commands ifup and ifdown are used to enable and shut down a network card interface.
Ifup eth0
Ifdown eth0
We usually use the setup command to set the Nic information
The configuration information of the Nic is saved in the following directory:
/ etc/sysconfig/network-scripts/
The configuration file is the name of the ifcfg- Nic, such as ifcfg-eth0
DEVICE= "eth0"
BOOTPROTO= "static" | dhcp
GATEWAY= "100.92.255.248"
HWADDR= "00:50:56:B3:82:DE"
IPADDR= "100.92.255.202"
IPV6INIT= "no"
NETMASK= "255.255.255.128"
NM_CONTROLLED= "yes"
ONBOOT= "yes"
TYPE= "Ethernet"
UUID= "0c753010-636b-4d92-8b4f-f07d310df2ff"
The DNS server IP is saved in:
/ etc/resolv.conf
The hostname configuration is saved in:
/ etc/sysconfig/network
Static hostname profile
/ etc/hosts
Common network commands:
Ping 192.168.1.1
Host www.linuxtest.net
Dig www.linuxtest.net
Ip route
Traceroute www.linuxtest.net
Mtr testing network quality
Ifconfig eth0 100.92.250.108 netmask 255.255.255.128
Network troubleshooting follows the principles from top to bottom and from the inside to the outside.
Gateway
Netstat-r
Route-n
Cat / etc/resolv.conf View DNS
Ip route show
Route-n
These are all the contents of the article "how to View the physical Information of the Network Card in Linux". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.