• Fix lỗi ifconfig: command not found trên Centos/RHEL


 #202  by nguyenoanh
 09 Jun 2018 16:10
Command ifconfig được sử dụng để xem chi tiết về cấu hình mạng trên hệ thống linux. Với hầu hết các hệ thống linux thì gói lệnh ifconfig được cài đặt mặc định. Tuy nhiên, nếu bạn gặp lỗi
 ifconfig: command not found
khi sử dụng trên centos/RHEL thì bạn có thể khắc phuc bằng cách cài đặt net-tools
yum install net-tools
Code: Select all
$ ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:FC:03:16  
          inet addr:108.61.150.186  Bcast:108.61.150.191  Mask:255.255.255.240
          inet6 addr: fe80::5054:ff:fefc:316/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:424674743 errors:0 dropped:0 overruns:0 frame:0
          TX packets:356450667 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:51931680123 (48.3 GiB)  TX bytes:1286409108540 (1.1 TiB)

eth1      Link encap:Ethernet  HWaddr 5A:00:00:00:1C:6F  
          inet addr:10.99.0.10  Bcast:10.99.255.255  Mask:255.255.0.0
          inet6 addr: fe80::5800:ff:fe00:1c6f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:630 (630.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:282247704 errors:0 dropped:0 overruns:0 frame:0
          TX packets:282247704 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:228902125297 (213.1 GiB)  TX bytes:228902125297 (213.1 GiB)
Code: Select all
 $ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 52:54:00:FC:03:16  
          inet addr:108.61.150.186  Bcast:108.61.150.191  Mask:255.255.255.240
          inet6 addr: fe80::5054:ff:fefc:316/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:424680681 errors:0 dropped:0 overruns:0 frame:0
          TX packets:356458107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:51932188449 (48.3 GiB)  TX bytes:1286427037056 (1.1 TiB)

olalavui liked this
Get 25 USD Free To USE VPSSIM