-bash: xxx: 未找到命令

本文列举了在Linux环境下遇到的一些命令未找到的问题,如netstat、javac、wget、zip、unzip、lsof、vim、htop、jsp、tailf和ifconfig等,并提供了相应的解决方案,通过yum安装相应的软件包来解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

-bash: xxx: 未找到命令

1.-bash: netstat: 未找到命令

yum -y install net-tools

2.javac java-version 找不到命令

yum install java-devel

3.linux安装jdk时,vim 未找到命令

4.-bash: wget: 未找到命令

yum -y install wget

5.bash: zip: command not found

yum install zip

6.bash: unzip: command not found

yum install unzip

8.-bash: lsof: command not found

yum install lsof -y

[root@localhost ~]# yum -y install net-tools

已加载插件:fastestmirror

Loading mirror speeds from cached hostfile

19. -bash: telnet: command not found的解决方法

yum install telnet-server -y 安装telnet服务 yum install telnet.* -y 安装telnet客户端

10.-bash: vim: command not found

sudo yum install vim -y

当进行安装jdk时,往往需要配置系统环境,当输入vim命令时,找不到vim命令,那么就需要加载插件了。

1、输入命令 rpm -qa|grep vim 查询已有的vim插件,正常此命令需要系统存在这样4条。

2、如果缺少,可以单独添加,也可以全部添加

比如这是单条逐个添加 yum -y install vim-enhanced

这是全部添加,比较省事 yum -y install vim*

3、最后再验证一下是否添加成功。

11.-bash: htop: 未找到命令

a.yum -y install htop

b.

步骤一:yum install -y epel-release

步骤二:yum install -y htop

c.wget http://sourceforge.net/projects/htop/files/htop/1.0.2/htop-1.0.2.tar.gz

cd htop-1.0.2

./configure && make && make install

注:如果提示 checking for gcc... no,需要安装gcc依赖

yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake

yum -y install wget httpd-tools vim

gcc --version

安装成功后输入命令调用

./configure && make && make install

 configure: error: You may want to use --disable-unicode or install libncursesw. , 表明缺少lib 包, 安装lib包:yum install ncurses-devel 

12.bash: jsp: command not found.

安装jdk就好了

13.-bash: tailf: command not found

#CentOS

yum install util-linux

14.-bash: ifconfig: command not found

sudo yum install net-tools -y

15.-bash: make: command not found

yum -y install gcc automake autoconf libtool make

安装g++:

yum install gcc gcc-c++

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

~石头

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值