什么是建议可安装软件包的程序?


11

我真正喜欢的Ubuntu功能之一是,如果您尝试运行未安装的程序,则建议安装软件包,如下所示:

$ nmap
The program 'nmap' is currently not installed. You can install it by typing:
sudo apt-get install nmap

这是Bash的特色功能吗?隐藏在后台的额外守护程序?它是如何做到的?

Answers:



2

就像以前的答案一样:

要为您自己的帐户关闭此功能(不卸载整个程序包,而对所有用户禁用此功能),您只需将以下行添加到您自己的〜/ .bashrc中:

unset command_not_found_handle

这将恢复为bash的默认行为(有关命令command_not_found_handle的定义,请参见/etc/bash.bashrc:如果已安装,则调用command-not-found,否则将输出默认的“找不到命令”错误消息)。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.