IDO老徐,坐标深圳,测试经理,干了十年测试,公号"简尚" ,博客isTester.com ,关注「软件测试从业者综合能力提升 & 职场人每日进阶」,个人微信957863300

Linux下安装ifconfig命令(Centos找不到ifconfig命令)

上一篇 / 下一篇  2020-02-15 16:19:32 / 个人分类:linux

51Testing软件测试网 s f(m9kZ*G

很多时候,最下化安装Linux ,会发现很多基础的命令都没有 。51Testing软件测试网^^ lR P+ad_N

这个时候,只能自己安装了 。51Testing软件测试网4]?M#`2X7A \Y8Vj


.my)`)TV:u,u'G%F0

比如,51Testing软件测试网 SR%U3gl+b#L

想查看刚安装的Linux服务器 ,IP地址是多少 。

n7c6_4s4G!l0


cmWc s*c^UW0

很多同学,会用ifconfig 查看 。

)VS%P,qV"M d Mp*T&W0


~,fFWCMq0

如果找不到此命令 ,怎么安装呢 ?51Testing软件测试网`aZ8^Ux`:{,~


D%N^"]6yg v0

直接用 yum install ifconfig  吗 ?

'ew^wv/^0

会发现,并不是 。51Testing软件测试网QOOh3vp*g


51Testing软件测试网w7m,AY?h{


51Testing软件测试网.U/vy&mik

怎么找到是啥命令呢 ?51Testing软件测试网;T\6Q$w.aEQ,dE(a

试试命令

7?Sg T ` MpN+~0

51Testing软件测试网|5Tw'| Z[*g3q

yum whatprovides ifconfig


s,n wp!O0
[root@idoxu-istester ~]# yum whatprovides ifconfig
Last metadata expiration check: 0:09:53 ago on Tue 26 Nov 2019 07:16:58 PM CST.
net-tools-2.0-0.51.20160912git.el8.i686 : Basic networking tools
Repo        : BaseOS
Matched from:
Filename    : /usr/sbin/ifconfig

net-tools-2.0-0.51.20160912git.el8.x86_64 : Basic networking tools
Repo        : BaseOS
Matched from:
Filename    : /usr/sbin/ifconfig

j*T5k$yi-b5q.b0

你会发现,原来在net-tools下 。

Fx7E1E Zycle0

执行命令 yum install net-tools 搞定 。51Testing软件测试网x-eR2VkY/} NE


51Testing软件测试网i2[ \'wv%[u

51Testing软件测试网 K*]``)u6^,V-t

[root@idoxu-istester ~]# yum install net-tools
Last metadata expiration check: 0:14:45 ago on Tue 26 Nov 2019 07:16:58 PM CST.
Dependencies resolved.
===================================================================================================================================
 Package                     Arch                     Version                                       Repository                Size
===================================================================================================================================
Installing:
 net-tools                   x86_64                   2.0-0.51.20160912git.el8                      BaseOS                   323 k

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

Total download size: 323 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
net-tools-2.0-0.51.20160912git.el8.x86_64.rpm                                                      158 kB/s | 323 kB     00:02    
-----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                               92 kB/s | 323 kB     00:03     
warning: /var/cache/dnf/BaseOS-929b586ef1f72f69/packages/net-tools-2.0-0.51.20160912git.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - Base                                                                                    1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                           1/1 
  Installing       : net-tools-2.0-0.51.20160912git.el8.x86_64                                                                 1/1 
  Running scriptlet: net-tools-2.0-0.51.20160912git.el8.x86_64                                                                 1/1 
  Verifying        : net-tools-2.0-0.51.20160912git.el8.x86_64                                                                 1/1 

Installed:
  net-tools-2.0-0.51.20160912git.el8.x86_64                                                                                        

Complete!

TAG: 软件测试 Linux linux

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

xuquan

xuquan

IDO老徐,坐标深圳,测试经理,干了十年测试,公号"简尚" ,博客isTester.com ,关注「软件测试从业者综合能力提升 & 职场人每日进阶」,个人微信957863300

日历

« 2020-02-28  
      1
2345678
9101112131415
16171819202122
23242526272829

数据统计

  • 访问量: 542830
  • 日志数: 363
  • 建立时间: 2012-06-04
  • 更新时间: 2020-02-15

RSS订阅

Open Toolbar