How to find commands associated with a package? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1













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?










share|improve this question















marked as duplicate by JdeBP, Stephen Kitt, Stephen Rauch, Stéphane Chazelas command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

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.


















    up vote
    1
    down vote

    favorite
    1













    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?










    share|improve this question















    marked as duplicate by JdeBP, Stephen Kitt, Stephen Rauch, Stéphane Chazelas command-line
    Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

    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.
















      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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 command-line
      Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

      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 command-line
      Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

      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.






















          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





          share|improve this answer






















          • 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











          • 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


















          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.






          share|improve this answer






















          • 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 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










          • @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


















          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





          share|improve this answer






















          • 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











          • 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















          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





          share|improve this answer






















          • 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











          • 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













          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





          share|improve this answer














          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






          share|improve this answer














          share|improve this answer



          share|improve this answer








          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 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

















          • 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











          • 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
















          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













          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.






          share|improve this answer






















          • 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 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










          • @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















          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.






          share|improve this answer






















          • 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 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










          • @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













          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.






          share|improve this answer














          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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 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










          • @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

















          • 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 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










          • @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
















          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



          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay