当CentOS7进行最小化安装时,有很多工具包是没有的。

[root@vultr ~]# ifconfig
-bash: ifconfig: command not found
[root@vultr ~]# netstat
-bash: netstat: command not found

  我们经常会使用到的命令,ifconfig、netstat等都没有。因为缺失了net-tools包。

[root@vultr ~]# yum install -y net-tools    # 安装net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.wdc1.us.leaseweb.net
* epel: reflector.westga.edu
* extras: mirror.vcu.edu
* updates: ftpmirror.your.org
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================
Installing:
net-tools x86_64 2.0-0.24.20131004git.el7 base 306 k Transaction Summary
=============================================================================================================================================
Install 1 Package Total download size: 306 k
Installed size: 918 k
Downloading packages:
net-tools-2.0-0.24.20131004git.el7.x86_64.rpm | 306 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : net-tools-2.0-0.24.20131004git.el7.x86_64 1/1
Verifying : net-tools-2.0-0.24.20131004git.el7.x86_64 1/1 Installed:
net-tools.x86_64 0:2.0-0.24.20131004git.el7 Complete!
[root@vultr ~]# ifconfig | grep inet
inet 155.138.229.164 netmask 255.255.254.0 broadcast 155.138.229.255
inet6 fe80::5400:1ff:feff:86b7 prefixlen 64 scopeid 0x20<link>
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
[root@vultr ~]# netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2746/sshd
tcp6 0 0 :::22 :::* LISTEN 2746/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 3381/dhclient
udp 0 0 127.0.0.1:323 0.0.0.0:* 1573/chronyd
udp6 0 0 ::1:323 :::* 1573/chronyd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 12953 1/systemd /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 14775 1/systemd /run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 7397 1/systemd /run/systemd/journal/stdout
unix 2 [ ACC ] SEQPACKET LISTENING 13039 1/systemd /run/udev/control

  安装net-tools工具包之后,ifconfig|netstat等网络相关的命令便能使用了。

ifconfig,netstat command not found的更多相关文章

  1. centos7 最小化安装 无 ifconfig,netstat 的安装

    centos7 最小化安装 无 ifconfig,netstat 的安装 centos7 最小化安装之后,默认是没有 ifconfig,netstat命令的: 我们可以直接使用 yum -y inst ...

  2. linux :没有找到 ifconfig netstat

    linux :没有找到 ifconfig netstat ubuntu sudo apt install net-tools -y centos yum install net-tools

  3. ubuntu无法找到ifconfig(command not found: ifconfig)

    演示环境 $ uname -a Linux xxxxx-xxxxx-xxxx5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x8 ...

  4. linux笔记:网络命令ping,traceroute,ifconfig,netstat;挂载和卸载命令mount,umount

    命令名称:ping功能:测试网络连通性命令所在路径:/bin/ping用法:ping [-c] IP地址参数:-c 指定发送次数 命令名称:ifconfig功能:查看和设置网卡信息(临时设置)命令所在 ...

  5. centos 7 ip a 或ifconfig 报command not found

    CentOS 7 下 ifconfig command not found 或 ip command not found 解决办法 首先查看:/sbin/ifconfig   /sbin/ip 是否存 ...

  6. 【CentOS】ifconfig命令 :command not found & yum命令 :cannot find a valid baserl for repo: base/7/x86_64

    第一课,学习的是安装linux的远程连接.相信看阿铭视频的朋友们都会知道,第一个开机输入完root后要敲的命令就是--ifconfig 非常幸运,这迎来了我的第一个问题 这时候你会选择百度,会搜索到这 ...

  7. 【转】linux root用户ifconfig报command not found

    解决办法: 方法一: 直接输入su - 回车.就可以ifconfig了 方法二: /etc/profile 把下面if语句注释掉: #path Manipulation if ["EUID& ...

  8. 解决Centos7不能联网且ifconfig出现command not found

    在虚拟机中以最小化方式安装centos7,后无法上网,因为centos7默认网卡未激活. 而且在sbin目录中没有ifconfig文件,这是因为centos7已经不使用 ifconfig命令了,已经用 ...

  9. centos7: ifconfig出现command not found解决办法

    问题 说下我linux配置情况,不一样的可以选择借鉴我的办法. 在虚拟机中以最小化方式安装centos7,ifconfig命令无效,而且在sbin目录中没有ifconfig文件. 原因 这是因为cen ...

随机推荐

  1. TypeError: web3.eth.Contract is not a constructor错误解决

    这是web3.js开发者在创建合约对象时很容易发生的错误,其实就是不同版本web3.js带来的API变化问题. 请检查你的web3.js版本: 如果version<1.0.0,使用: web3. ...

  2. 区块链--Bitcoin共识机制

    目录 中心化和去中心化 比特币共识机制 拜占庭将军共识机制 比特币成功解决了拜占庭问题 中心化和去中心化 中心化模式: 优点:效率高 缺点:中间层次太多(组织层次连接) 去中心化模式: 缺点:效率低 ...

  3. mysql学习(3)10045错误,连接不上数据库

    mysql8.0默认加密的方式是caching_sha2_password认证方式,当使用navicat 或者程序连接是连接不上, 好吧,那我们修改配置并重启服务可以解决此问题 找到mysql的配置文 ...

  4. Linux内核分析作业 NO.5

    拔掉系统调用的三层皮(下) 于佳心 原创作品转载请注明出处 <Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-100002900 ...

  5. 一个java实现的简单的4则运算器

    有些基础知识有欠缺,补一下,顺便练习一下java import com.sun.deploy.util.ArrayUtil; import java.util.*; public class Main ...

  6. Navicat连接Mysql8.0失败:Client does not support authentication protocol requested by server...

    今天Mysql服务无法启动,看着网上的教程稀里糊涂的就用命令mysqld --initialize给初始化了,结果就是以前的表都没了,重新安装后,Navicat无法连接数据库 解决方法如下: 意思是直 ...

  7. Linux命令(二十) 显示系统内存状态 free

    一.命令简介 free 命令会显示内存的使用情况,包括实体内存,虚拟的交换文件内存.共享内存区段,以及系统核心使用的缓冲区等. 二.参数说明 -b 以Byte为单位显示内存使用情况 -K 以KB为单位 ...

  8. Redis的相关问题总结

    一.Redis的优缺点及适用场景 Redis 是一个基于内存的高性能key-value数据库.很像memcached,整个数据库统统加载在内存当中进行操作,定期通过异步操作把数据库数据flush到硬盘 ...

  9. 学习 TTreeView [3] - Add、AddChild、AddFirst、AddChildFirst、Parent

    本例效果图: unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Contro ...

  10. python315题

    目录 Python基础篇 1:为什么学习Python 2:通过什么途径学习Python 3:谈谈对Python和其他语言的区别 Python的优势: 4:简述解释型和编译型编程语言 5:Python的 ...