pkgfile includes a “command not found” hook that will automatically search the official repositories, when entering an unrecognized command.
First
make sure that pkgfile
package have been installed. if not, do it as follows:
pacman -S pkgfile
Then
edit ~/.bashrc
by vim ( or any text editor you perfer to. )
add the following line at the end of the file.
source /usr/share/doc/pkgfile/command-not-found.bash
logout and login again. you should got the magic.
(ps. instead of re-login, you could just execute that line, which seems more simple)
Test
try to enter a command haven’t installed yet. you will get the packages info about it.
[root@ArchLinux ~]# wget
wget may be found in the following packages:
extra/wget 1.16.3-1 /usr/bin/wget
Leave A Comment