How to find commands associated with a package? [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
This question already has an answer here:
List all commands of a specific Debian package
4 answers
Sometimes I find myself installing a package and then trying to run a command using the same name, like with geoip-bin
package:
$ sudo apt install geoip-bin
[...]
$ geoip-bin
geoip-bin: command not found
How may I find all the commands associated with a given package?
command-line apt package-management command dpkg
marked as duplicate by JdeBP, Stephen Kitt, Stephen Rauch, Stéphane Chazelas
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 26 '17 at 21:16
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.
add a comment |Â
up vote
1
down vote
favorite
This question already has an answer here:
List all commands of a specific Debian package
4 answers
Sometimes I find myself installing a package and then trying to run a command using the same name, like with geoip-bin
package:
$ sudo apt install geoip-bin
[...]
$ geoip-bin
geoip-bin: command not found
How may I find all the commands associated with a given package?
command-line apt package-management command dpkg
marked as duplicate by JdeBP, Stephen Kitt, Stephen Rauch, Stéphane Chazelas
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 26 '17 at 21:16
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.
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
This question already has an answer here:
List all commands of a specific Debian package
4 answers
Sometimes I find myself installing a package and then trying to run a command using the same name, like with geoip-bin
package:
$ sudo apt install geoip-bin
[...]
$ geoip-bin
geoip-bin: command not found
How may I find all the commands associated with a given package?
command-line apt package-management command dpkg
This question already has an answer here:
List all commands of a specific Debian package
4 answers
Sometimes I find myself installing a package and then trying to run a command using the same name, like with geoip-bin
package:
$ sudo apt install geoip-bin
[...]
$ geoip-bin
geoip-bin: command not found
How may I find all the commands associated with a given package?
This question already has an answer here:
List all commands of a specific Debian package
4 answers
command-line apt package-management command dpkg
command-line apt package-management command dpkg
edited Sep 26 '17 at 19:06
Kusalananda
106k14209327
106k14209327
asked Sep 26 '17 at 18:06
Pablo Bianchi
409111
409111
marked as duplicate by JdeBP, Stephen Kitt, Stephen Rauch, Stéphane Chazelas
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 26 '17 at 21:16
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.
marked as duplicate by JdeBP, Stephen Kitt, Stephen Rauch, Stéphane Chazelas
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 26 '17 at 21:16
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.
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
You can use the command dpkg
:
dpkg -S $(which <command>)
e,g:
$ dpkg -S $(which cp)
coreutils: /bin/cp
the command cp
is a part of coreutils
package.
To see all commands associated to coreutils
package:
$dpkg -s coreutils
Specifically, this package includes:
arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
csplit cut date dd df dir dircolors dirname du echo env expand expr
factor false flock fmt fold groups head hostid id install join link ln
logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt
od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm
rmdir runcon sha*sum seq shred sleep sort split stat stty sum sync tac
tail tee test timeout touch tr true truncate tsort tty uname unexpand
uniq unlink users vdir wc who whoami yes
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
But that's particular tocoreutils
package, they decide to put that on Description metadata field. Usedpkg -s geoip-bin
(orapt show
) and you won't get a list of available commands.
â Pablo Bianchi
Sep 26 '17 at 18:45
correctdpkg -s
will not show all the available commands,dlocate
should be the easy and the fast way (Gille and Terdon answer's)
â GAD3R
Sep 27 '17 at 8:33
add a comment |Â
up vote
2
down vote
accepted
dpkg -L
-L, --listfiles package-name
List files installed to your system from package-name.
Two alternatives:
Usually works just:
dpkg -L byobu | egrep '/bin/|/sbin/'
.Or with some bash magic:
for f in $(dpkg -L geoip-bin) ; do test -x $f -a ! -d $f && echo $f ; done
Optionally you could add
| grep "/usr/bin/"
at the end to list executables files on that particular folder.
geoiplookup
was the command of geoip-bin
. I also found this very useful to learn about other commands of any package.
Not everything lives in/usr/bin
though e.g.mailman
hides commands under/usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Shorter with justdpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@PabloBianchi No, but if you look at your$PATH
, it mostly contains/bin/
directories, right? You could change it tobin/
to also catch anysbin
commands.
â Kusalananda
Sep 26 '17 at 19:37
 |Â
show 1 more comment
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
You can use the command dpkg
:
dpkg -S $(which <command>)
e,g:
$ dpkg -S $(which cp)
coreutils: /bin/cp
the command cp
is a part of coreutils
package.
To see all commands associated to coreutils
package:
$dpkg -s coreutils
Specifically, this package includes:
arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
csplit cut date dd df dir dircolors dirname du echo env expand expr
factor false flock fmt fold groups head hostid id install join link ln
logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt
od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm
rmdir runcon sha*sum seq shred sleep sort split stat stty sum sync tac
tail tee test timeout touch tr true truncate tsort tty uname unexpand
uniq unlink users vdir wc who whoami yes
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
But that's particular tocoreutils
package, they decide to put that on Description metadata field. Usedpkg -s geoip-bin
(orapt show
) and you won't get a list of available commands.
â Pablo Bianchi
Sep 26 '17 at 18:45
correctdpkg -s
will not show all the available commands,dlocate
should be the easy and the fast way (Gille and Terdon answer's)
â GAD3R
Sep 27 '17 at 8:33
add a comment |Â
up vote
2
down vote
You can use the command dpkg
:
dpkg -S $(which <command>)
e,g:
$ dpkg -S $(which cp)
coreutils: /bin/cp
the command cp
is a part of coreutils
package.
To see all commands associated to coreutils
package:
$dpkg -s coreutils
Specifically, this package includes:
arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
csplit cut date dd df dir dircolors dirname du echo env expand expr
factor false flock fmt fold groups head hostid id install join link ln
logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt
od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm
rmdir runcon sha*sum seq shred sleep sort split stat stty sum sync tac
tail tee test timeout touch tr true truncate tsort tty uname unexpand
uniq unlink users vdir wc who whoami yes
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
But that's particular tocoreutils
package, they decide to put that on Description metadata field. Usedpkg -s geoip-bin
(orapt show
) and you won't get a list of available commands.
â Pablo Bianchi
Sep 26 '17 at 18:45
correctdpkg -s
will not show all the available commands,dlocate
should be the easy and the fast way (Gille and Terdon answer's)
â GAD3R
Sep 27 '17 at 8:33
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You can use the command dpkg
:
dpkg -S $(which <command>)
e,g:
$ dpkg -S $(which cp)
coreutils: /bin/cp
the command cp
is a part of coreutils
package.
To see all commands associated to coreutils
package:
$dpkg -s coreutils
Specifically, this package includes:
arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
csplit cut date dd df dir dircolors dirname du echo env expand expr
factor false flock fmt fold groups head hostid id install join link ln
logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt
od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm
rmdir runcon sha*sum seq shred sleep sort split stat stty sum sync tac
tail tee test timeout touch tr true truncate tsort tty uname unexpand
uniq unlink users vdir wc who whoami yes
You can use the command dpkg
:
dpkg -S $(which <command>)
e,g:
$ dpkg -S $(which cp)
coreutils: /bin/cp
the command cp
is a part of coreutils
package.
To see all commands associated to coreutils
package:
$dpkg -s coreutils
Specifically, this package includes:
arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
csplit cut date dd df dir dircolors dirname du echo env expand expr
factor false flock fmt fold groups head hostid id install join link ln
logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt
od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm
rmdir runcon sha*sum seq shred sleep sort split stat stty sum sync tac
tail tee test timeout touch tr true truncate tsort tty uname unexpand
uniq unlink users vdir wc who whoami yes
edited Sep 26 '17 at 18:34
answered Sep 26 '17 at 18:29
GAD3R
22.7k154895
22.7k154895
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
But that's particular tocoreutils
package, they decide to put that on Description metadata field. Usedpkg -s geoip-bin
(orapt show
) and you won't get a list of available commands.
â Pablo Bianchi
Sep 26 '17 at 18:45
correctdpkg -s
will not show all the available commands,dlocate
should be the easy and the fast way (Gille and Terdon answer's)
â GAD3R
Sep 27 '17 at 8:33
add a comment |Â
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
But that's particular tocoreutils
package, they decide to put that on Description metadata field. Usedpkg -s geoip-bin
(orapt show
) and you won't get a list of available commands.
â Pablo Bianchi
Sep 26 '17 at 18:45
correctdpkg -s
will not show all the available commands,dlocate
should be the easy and the fast way (Gille and Terdon answer's)
â GAD3R
Sep 27 '17 at 8:33
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
What I asked was the opposite. Not getPackage(command) but getCommands(package).
â Pablo Bianchi
Sep 26 '17 at 18:32
But that's particular to
coreutils
package, they decide to put that on Description metadata field. Use dpkg -s geoip-bin
(or apt show
) and you won't get a list of available commands.â Pablo Bianchi
Sep 26 '17 at 18:45
But that's particular to
coreutils
package, they decide to put that on Description metadata field. Use dpkg -s geoip-bin
(or apt show
) and you won't get a list of available commands.â Pablo Bianchi
Sep 26 '17 at 18:45
correct
dpkg -s
will not show all the available commands, dlocate
should be the easy and the fast way (Gille and Terdon answer's)â GAD3R
Sep 27 '17 at 8:33
correct
dpkg -s
will not show all the available commands, dlocate
should be the easy and the fast way (Gille and Terdon answer's)â GAD3R
Sep 27 '17 at 8:33
add a comment |Â
up vote
2
down vote
accepted
dpkg -L
-L, --listfiles package-name
List files installed to your system from package-name.
Two alternatives:
Usually works just:
dpkg -L byobu | egrep '/bin/|/sbin/'
.Or with some bash magic:
for f in $(dpkg -L geoip-bin) ; do test -x $f -a ! -d $f && echo $f ; done
Optionally you could add
| grep "/usr/bin/"
at the end to list executables files on that particular folder.
geoiplookup
was the command of geoip-bin
. I also found this very useful to learn about other commands of any package.
Not everything lives in/usr/bin
though e.g.mailman
hides commands under/usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Shorter with justdpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@PabloBianchi No, but if you look at your$PATH
, it mostly contains/bin/
directories, right? You could change it tobin/
to also catch anysbin
commands.
â Kusalananda
Sep 26 '17 at 19:37
 |Â
show 1 more comment
up vote
2
down vote
accepted
dpkg -L
-L, --listfiles package-name
List files installed to your system from package-name.
Two alternatives:
Usually works just:
dpkg -L byobu | egrep '/bin/|/sbin/'
.Or with some bash magic:
for f in $(dpkg -L geoip-bin) ; do test -x $f -a ! -d $f && echo $f ; done
Optionally you could add
| grep "/usr/bin/"
at the end to list executables files on that particular folder.
geoiplookup
was the command of geoip-bin
. I also found this very useful to learn about other commands of any package.
Not everything lives in/usr/bin
though e.g.mailman
hides commands under/usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Shorter with justdpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@PabloBianchi No, but if you look at your$PATH
, it mostly contains/bin/
directories, right? You could change it tobin/
to also catch anysbin
commands.
â Kusalananda
Sep 26 '17 at 19:37
 |Â
show 1 more comment
up vote
2
down vote
accepted
up vote
2
down vote
accepted
dpkg -L
-L, --listfiles package-name
List files installed to your system from package-name.
Two alternatives:
Usually works just:
dpkg -L byobu | egrep '/bin/|/sbin/'
.Or with some bash magic:
for f in $(dpkg -L geoip-bin) ; do test -x $f -a ! -d $f && echo $f ; done
Optionally you could add
| grep "/usr/bin/"
at the end to list executables files on that particular folder.
geoiplookup
was the command of geoip-bin
. I also found this very useful to learn about other commands of any package.
dpkg -L
-L, --listfiles package-name
List files installed to your system from package-name.
Two alternatives:
Usually works just:
dpkg -L byobu | egrep '/bin/|/sbin/'
.Or with some bash magic:
for f in $(dpkg -L geoip-bin) ; do test -x $f -a ! -d $f && echo $f ; done
Optionally you could add
| grep "/usr/bin/"
at the end to list executables files on that particular folder.
geoiplookup
was the command of geoip-bin
. I also found this very useful to learn about other commands of any package.
edited Mar 6 at 22:46
answered Sep 26 '17 at 18:06
Pablo Bianchi
409111
409111
Not everything lives in/usr/bin
though e.g.mailman
hides commands under/usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Shorter with justdpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@PabloBianchi No, but if you look at your$PATH
, it mostly contains/bin/
directories, right? You could change it tobin/
to also catch anysbin
commands.
â Kusalananda
Sep 26 '17 at 19:37
 |Â
show 1 more comment
Not everything lives in/usr/bin
though e.g.mailman
hides commands under/usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Shorter with justdpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@PabloBianchi No, but if you look at your$PATH
, it mostly contains/bin/
directories, right? You could change it tobin/
to also catch anysbin
commands.
â Kusalananda
Sep 26 '17 at 19:37
Not everything lives in
/usr/bin
though e.g. mailman
hides commands under /usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Not everything lives in
/usr/bin
though e.g. mailman
hides commands under /usr/lib/mailman/bin
â thrig
Sep 26 '17 at 18:42
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Sure, that's why I put optionally. I extended the answer to make it more clear.
â Pablo Bianchi
Sep 26 '17 at 18:49
Shorter with just
dpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
Shorter with just
dpkg -L package | grep '/bin/'
â Kusalananda
Sep 26 '17 at 19:29
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@Kusalananda It's impossible for a package command to be in a directory that does not contain "/bin/" on it path?
â Pablo Bianchi
Sep 26 '17 at 19:34
@PabloBianchi No, but if you look at your
$PATH
, it mostly contains /bin/
directories, right? You could change it to bin/
to also catch any sbin
commands.â Kusalananda
Sep 26 '17 at 19:37
@PabloBianchi No, but if you look at your
$PATH
, it mostly contains /bin/
directories, right? You could change it to bin/
to also catch any sbin
commands.â Kusalananda
Sep 26 '17 at 19:37
 |Â
show 1 more comment