linux系统中安装ifconfig命令

1、发现没有ifconfig命令

[root@PC3 ~]# ifconfig
bash: ifconfig: command not found...

 

2、查找安装包

[root@PC3 ~]# yum list | grep net-tool*
net-tools.x86_64                       2.0-0.17.20131004git.el7    rhel7    

 

3、安装

复制代码
[root@PC3 ~]# yum install -y net-tools.x86_64 
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch         Version                         Repository   Size
================================================================================
Installing:
 net-tools       x86_64       2.0-0.17.20131004git.el7        rhel7       304 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 304 k
Installed size: 917 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.17.20131004git.el7.x86_64                    1/1 
  Verifying  : net-tools-2.0-0.17.20131004git.el7.x86_64                    1/1 

Installed:
  net-tools.x86_64 0:2.0-0.17.20131004git.el7                                   

Complete!
复制代码

 

4、测试

复制代码
[root@PC3 ~]# ifconfig
eno16777728: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0c:29:7d:e7:11  txqueuelen 1000  (Ethernet)
        RX packets 19  bytes 6216 (6.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 658  bytes 51708 (50.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 658  bytes 51708 (50.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
复制代码

 

posted @   小鲨鱼2018  阅读(5890)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示