我正在定制Linux系统。为什么ifconfig
看不到网卡
enp1s0
信息?但是能ls/sys/class/net
看到网卡吗?需要配置IP吗?为什么ifconfig
连看都看不到lo
?
# ls /sys/class/net
enp1s0 enp2s0 lo
# ifconfig
enp2s0 Link encap:Ethernet HWaddr 00:E0:B4:60:C6:C2
inet addr:192.168.5.2 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:b4ff:fe60:c6c2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107063 errors:0 dropped:0 overruns:0 frame:0
TX packets:207378 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6752435 (6.4 MiB) TX bytes:24490846 (23.3 MiB)