I just installed Archlinux and want to install netstat. However using the command pacman -Ss netstat outputs irrelevant package names. A search on internet revealed that netstat is owned by net-tools. Installing net-tools gave me access to netstat. How should one proceed to find the package name to install with pacman when only the final bash command is known ?
How to search for a package with pacman?
arch linux;pacman
The best way that I have found until now is to use the pkgfile command.You could install it by:# sudo pacman -S pkgfileaccording to the official arch wiki,pkgfile is a tool for searching files from packages in the official repositories. (files being the binaries you mentioned as bash commands).  You can also update its database by running:# pkgfile -uor you could just enable its systemd timer for it to update automatically:# systemctl enable pkgfile-update.timer# systemctl start pkgfile-update.timerawsome, right ?! :)Example# pkgfile netstatcore/net-toolsextra/munin-node# pkgfile netstat --verbosecore/net-tools 1.60.20160710git-1       /usr/bin/netstatextra/munin-node 2.0.26-2               /usr/lib/munin/plugins/netstat