linux命令找不到命令_Linux“找不到命令”错误和解决方案

linux命令找不到命令

linux命令找不到命令

A common problem for system administrators or daily Linux users is “command not found” error. There are different causes of this problem. We can troubleshoot this problem in several ways.

对于系统管理员或日常Linux用户而言,常见问题是“找不到命令”错误。 有此问题的不同原因。 我们可以通过几种方式解决此问题。

错误拼写错误 (Misspell Error)

Misspelling is number one problem especially novice users or beginners. Here is an example we will try to run nmap command but we will misspell namp like below.

拼写错误是头号问题,尤其是新手用户或初学者。 这是一个示例,我们将尝试运行nmap命令,但将如下所示拼写namp。

$ namp
Misspell Error
Misspell Error
错误拼写错误

In this example, we try to run Nmap but misspelled it. Ubuntu provides some help by listing suggestion about the correct command.

在此示例中,我们尝试运行Nmap但拼写错误。 Ubuntu通过列出有关正确命令的建议来提供一些帮助。

路径不正确 (Path Is Not Correct)

Path is used to specify commands locations. If command location is not specified in PATH environment variable we can get  an error like “The command could not be located”

路径用于指定命令位置。 如果未在PATH环境变量中指定命令位置,则会出现类似“找不到命令”的错误

$ zip

We can solve this by adding /usr/bin to the PATH environment variable and export it like below.

我们可以通过将/usr/bin添加到PATH环境变量并按如下所示将其导出来解决此问题。

$ export PATH=$PATH:"/usr/bin"
Add new directory and export PATH
添加新目录并导出PATH

未安装 (Not Installed)

We generally assume that application is all readily installed. But default installed applications and commands changes from distribution to distribution or release from release

我们通常认为应用程序很容易安装。 但是默认安装的应用程序和命令会在发行版本之间发生变化,或者在发行版本之间发生变化

$ aircrack-ng

So we can solve this by installing the given package or tool like below.

因此,我们可以通过安装如下所示的给定软件包或工具来解决此问题。

$ sudo apt install aircrack-ng
Install aircrack-ng
Install aircrack-ng
安装aircrack-ng
LEARN MORE  What Is POSIX (Portable Operating System Interface) and It's Relation with Linux?
了解更多什么是POSIX(便携式操作系统接口),它与Linux有什么关系?

翻译自: https://www.poftut.com/linux-command-not-found-error-solution/

linux命令找不到命令

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值