装了 ubuntu 10.4和升级后的版本都会有此问题,主要是
No command 'asdf' found, did you mean:
Command 'asdfg' from package 'aoeui' (universe)
Command 'sadf' from package 'sysstat' (main)
Command 'sdf' form package 'sdf' (universe)
asdf : command not found
这常常使人非常沮丧,当敲错命令后,不得不按下CTRL'C来结束此次命令的运行。
让我们来看看此动作,ubuntu是如何做到的:
这项任务是由/etc/bash.bashrc里面的bash函数调用command_not_found_handle() 来实现的。
查看此包的详情:
root@zanget:~# dpkg --list | grep command-not-found
ii command-not-found 0.2.40ubuntu5 Suggest installation of packages in interact
ii command-not-found-data 0.2.40ubuntu5 Set of data files for command-not-found.
移除:
dpkg -r command-not-found
dpkg -r command-not-found-data