ifconfig,netstat command not found
当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的更多相关文章
- centos7 最小化安装 无 ifconfig,netstat 的安装
centos7 最小化安装 无 ifconfig,netstat 的安装 centos7 最小化安装之后,默认是没有 ifconfig,netstat命令的: 我们可以直接使用 yum -y inst ...
- linux :没有找到 ifconfig netstat
linux :没有找到 ifconfig netstat ubuntu sudo apt install net-tools -y centos yum install net-tools
- 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 ...
- linux笔记:网络命令ping,traceroute,ifconfig,netstat;挂载和卸载命令mount,umount
命令名称:ping功能:测试网络连通性命令所在路径:/bin/ping用法:ping [-c] IP地址参数:-c 指定发送次数 命令名称:ifconfig功能:查看和设置网卡信息(临时设置)命令所在 ...
- centos 7 ip a 或ifconfig 报command not found
CentOS 7 下 ifconfig command not found 或 ip command not found 解决办法 首先查看:/sbin/ifconfig /sbin/ip 是否存 ...
- 【CentOS】ifconfig命令 :command not found & yum命令 :cannot find a valid baserl for repo: base/7/x86_64
第一课,学习的是安装linux的远程连接.相信看阿铭视频的朋友们都会知道,第一个开机输入完root后要敲的命令就是--ifconfig 非常幸运,这迎来了我的第一个问题 这时候你会选择百度,会搜索到这 ...
- 【转】linux root用户ifconfig报command not found
解决办法: 方法一: 直接输入su - 回车.就可以ifconfig了 方法二: /etc/profile 把下面if语句注释掉: #path Manipulation if ["EUID& ...
- 解决Centos7不能联网且ifconfig出现command not found
在虚拟机中以最小化方式安装centos7,后无法上网,因为centos7默认网卡未激活. 而且在sbin目录中没有ifconfig文件,这是因为centos7已经不使用 ifconfig命令了,已经用 ...
- centos7: ifconfig出现command not found解决办法
问题 说下我linux配置情况,不一样的可以选择借鉴我的办法. 在虚拟机中以最小化方式安装centos7,ifconfig命令无效,而且在sbin目录中没有ifconfig文件. 原因 这是因为cen ...
随机推荐
- Github与SmartGit使用说明与建议
当使用github做协同的时候,我们常常需要在客户端安装相应的软件,SmartGit就是一款非常出色的软件,不过是要付费的,我们可以使用non-commercial版本. Download: http ...
- 11慕课网《进击Node.js基础(一)》Buffer和Stream
Buffer 用来保存原始数据 (logo.png) 以下代码读取logo.png为buffer类型 然后将buffer转化为string,新建png 可以将字符串配置: data:image/png ...
- Teechart使用记录
一. Chart 1.1 Series 在该界面可以进行曲线的添加.删除.修改 1.2 General 在该界面 Margins 可以设置整个坐标系外边距. 在这里可是设置放大功能. All ...
- spring-boot随笔
配置了spring-boot-starter-web的依赖后,会自动添加tomcat和spring mvc的依赖,那么spring boot 会对tomcat和spring mvc进行自动配置 < ...
- 数学口袋精灵app(小学生四则运算app)开发需求
数学口袋精灵APP,摒除了传统乏味无趣学习数学四则运算的模式,采用游戏的形式,让小朋友在游戏中学习,培养了小朋友对数学的兴趣,让小朋友在游戏中运算能力得到充分提升.快乐学习,成长没烦恼! 项目名字:“ ...
- 课程回顾5in1
提出过的问题 问题1:敏捷开发在现阶段急于使用或试行,会不会得到相反的结果? 整个开发流程在施行了一整个学期,有积极的影响,也有消极的影响.例如通过这个流程的实施,规划短期的项目进度,使得成员能逐步了 ...
- PAT 甲级 1066 Root of AVL Tree
https://pintia.cn/problem-sets/994805342720868352/problems/994805404939173888 An AVL tree is a self- ...
- Linux命令(二十六) 用户管理命令
一.添加用户 useradd useradd 命令用于创建新用户,格式为useradd [选项] 用户名. 可以使用 useradd 命令创建用户帐户,使用该命令创建账户时,默认的用户目录在 /hom ...
- robotframework+Selenium2Library 模态窗口的处理
原文链接:https://www.cnblogs.com/zuola/p/5750018.html 所谓模态窗口,就是指除非采取有效的关闭手段,用户的鼠标焦点或者输入光标将一直停留在其上的对话框. ...
- Vue入门---属性、style和class绑定方法
一 .用对象的方法绑定class <!DOCTYPE html> <html> <head> <meta charset="UTF-8"& ...