前两天需要使用mkpasswd这个命令用来加密密码,发现ubuntu16.04似乎没有自带这个命令, 直接apt-get install mkpasswd显示找不到任何软件包.就在想如果有个命令可以反向查找软件包名称就好了,google了一下果然有, 在这里记录一下,以免遗忘.
Ubuntu:
$apt-get install apt-file
$apt-file update
$apt-file search
$apt-file search mkpasswd
CentOS:
yum whatprovides commandName