Question is really simple: I want to get the package which contain a file,in this example I will use "ifconfig".

On Centos I use

yum --whatprovides *bin/ifconfig

On debian I can use

apt-file search *bin/ifconfig

And on Archlinux with pacman?

marked as duplicate by X Tian, Philippos, roaima, sebasth, Jeff Schaller Sep 20 at 18:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

pacman -Fy
pacman -Fs whatever_file

First command pulls the latest databases of files, second one searches for the file you are looking for(in this example whatever_file).

You may want to read here further

Not the answer you're looking for? Browse other questions tagged or ask your own question.