Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know about rpm, but I am newbie about freebsd packaging system. I learnt about how to create package and know I want learn how to get some information about packages or files. Can somebody give me corresponding freebsd commands of below rpm commands?

rpm -qlp <package> # list files of a package
rpm -qf <file>     # show package name that file belong to
rpm -aq            # show all installed packages
share|improve this question
up vote 3 down vote accepted

Taking nano as an example,

to list package contents, use

pkg_info -L nano-2.2.6

to query owner of a file,

pkg_info -W /usr/local/bin/nano

The last one is easy, just run


share|improve this answer
Just remember that the systems are different, some things just won't have a translation. Learn how to use the FreeBSD system natively (just like they tell you when learning a foreign language: don't translate, think in it). – vonbrand Feb 16 '13 at 14:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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