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

  1. [root@vultr ~]# ifconfig
  2. -bash: ifconfig: command not found
  3. [root@vultr ~]# netstat
  4. -bash: netstat: command not found

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

  1. [root@vultr ~]# yum install -y net-tools # 安装net-tools
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * base: mirror.wdc1.us.leaseweb.net
  5. * epel: reflector.westga.edu
  6. * extras: mirror.vcu.edu
  7. * updates: ftpmirror.your.org
  8. Resolving Dependencies
  9. --> Running transaction check
  10. ---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed
  11. --> Finished Dependency Resolution
  12.  
  13. Dependencies Resolved
  14.  
  15. =============================================================================================================================================
  16. Package Arch Version Repository Size
  17. =============================================================================================================================================
  18. Installing:
  19. net-tools x86_64 2.0-0.24.20131004git.el7 base 306 k
  20.  
  21. Transaction Summary
  22. =============================================================================================================================================
  23. Install 1 Package
  24.  
  25. Total download size: 306 k
  26. Installed size: 918 k
  27. Downloading packages:
  28. net-tools-2.0-0.24.20131004git.el7.x86_64.rpm | 306 kB 00:00:00
  29. Running transaction check
  30. Running transaction test
  31. Transaction test succeeded
  32. Running transaction
  33. Installing : net-tools-2.0-0.24.20131004git.el7.x86_64 1/1
  34. Verifying : net-tools-2.0-0.24.20131004git.el7.x86_64 1/1
  35.  
  36. Installed:
  37. net-tools.x86_64 0:2.0-0.24.20131004git.el7
  38.  
  39. Complete!
  40. [root@vultr ~]# ifconfig | grep inet
  41. inet 155.138.229.164 netmask 255.255.254.0 broadcast 155.138.229.255
  42. inet6 fe80::5400:1ff:feff:86b7 prefixlen 64 scopeid 0x20<link>
  43. inet 127.0.0.1 netmask 255.0.0.0
  44. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  45. [root@vultr ~]# netstat -lnp
  46. Active Internet connections (only servers)
  47. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
  48. tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2746/sshd
  49. tcp6 0 0 :::22 :::* LISTEN 2746/sshd
  50. udp 0 0 0.0.0.0:68 0.0.0.0:* 3381/dhclient
  51. udp 0 0 127.0.0.1:323 0.0.0.0:* 1573/chronyd
  52. udp6 0 0 ::1:323 :::* 1573/chronyd
  53. Active UNIX domain sockets (only servers)
  54. Proto RefCnt Flags Type State I-Node PID/Program name Path
  55. unix 2 [ ACC ] STREAM LISTENING 12953 1/systemd /run/systemd/private
  56. unix 2 [ ACC ] STREAM LISTENING 14775 1/systemd /run/dbus/system_bus_socket
  57. unix 2 [ ACC ] STREAM LISTENING 7397 1/systemd /run/systemd/journal/stdout
  58. 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. mac 安装 tomcat 配置

    前面的话:记录下 Mac 安装配置 Tomcat 过程 1. 下载安装 Tomcat 下载 Tomcat 地址(官方地址):https://tomcat.apache.org/download-80. ...

  2. 团队工作总结及自评 & 补上来的用户调研

    http://www.cnblogs.com/case1/ 让同学代发了,辛苦点跳转一下~

  3. C#(近期目标)

    最近很多同学为了实习都在学Java,但是我个人更偏好C#,首先因为自己基础不是太好,而C#又更容易入门,拥有比较完善的开发环境,是微软开发出来的语言.它吸收了C++和Java两门语言的所有有点,因为它 ...

  4. python 如何写CMD命令工具

    #-*- coding: UTF- -*- import argparse import sys: sys.argv.append('--help') parser = argparse.Argume ...

  5. JavaScript ES6中export及export default的区别以及import的用法

    本文原创地址链接:http://blog.csdn.net/zhou_xiao_cheng/article/details/52759632,未经博主允许不得转载. 相信很多人都使用过export.e ...

  6. js用currentStyle和getComputedStyle获取css样式(非行间) 兼容ie与火狐

    用js的style属性可以获得html标签的样式,但是不能获取非行间样式.那么怎么用js获取css的非行间样式呢?在IE下可以用currentStyle,而在火狐下面我们需要用到getComputed ...

  7. Helm 安装 wordpress

    1. 前置需要安装 storageclass 然后 安装helm 客户端 helm tiller 服务端 2. 设置 当前的位阿里云的 repo 3. 查找 wordpress的镜像 helm sea ...

  8. k8s 实验过程中遇到的两个小问题 端口 和 批量删除Error的pods

    1. 自己kubeadm搭建的一套k8s系统 然后进行做实验 发现了几个问题 jenkins 创建 salves的时候总是有问题.  提示注册不上 然后 我修改了下yaml文件 暴露端口 50000 ...

  9. Delphi窗体部分属性

    Align属性:控制窗体显示时的对齐方式(注:是相对于父窗体的对齐方式.如果该窗体是主窗体则没有父窗体)(与anchor不同在于,anchor定义的对齐是固定到边界的距离) 默认值为alNone.其他 ...

  10. maven测试时中文乱码问题解决方法

    pom.xml增加-Dfile.encoding=UTF-8配置,如下: <plugin> <!--升级到新版本解决控制台乱码问题--> <groupId>org. ...