[clug] Software ergonomics

Scott Ferguson scott.ferguson.clug at gmail.com
Tue Jan 27 14:17:40 MST 2015

On 28/01/15 04:56, Bryan Kilgallin wrote:
>> On a box with RPM, you could type:
> So I installed the RPM Package Manager.

Not necessary on Debian (or Debian-based Ubuntu) as you already have a
package manager.

As root:-

# Find out what program is called by a command
which route

# Find out what package a program belongs to
dpkg -S `which route`
net-tools: /sbin/route


dpkg -S /sbin/route
net-tools: /sbin/route

# Find out the version and architecture of a package
dpkg -l net-tools
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version         Architecture    Description
ii  net-tools            1.60-24.2       i386            The NET-3
networking toolkit

If you have apt-file installed (and updated) you can alternatively do:-

which route

apt-file search /sbin/route
net-tools: /sbin/route

OR shorten it with:-
apt-file search `which route`
net-tools: /sbin/route

NOTE: apt-file will also provide you with information about files that
you haven't installed. e.g. the error message says "can't find foo.bar"
and after searching your system you can't find foo.bar, in which case
"apt-file search foo.bar" will tell you which package you need to
install to provide foo.bar


Hope that helps

Kind regards

More information about the linux mailing list