hwinfo not found after seemingly successful install

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











up vote
2
down vote

favorite












I installed hwinfo using sudo apt-get install hwinfo and the system tells me that:



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
hwinfo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32.8 kB of archives.
After this operation, 90.1 kB of additional disk space will be used.
Selecting previously unselected package hwinfo.
(Reading database ... 192008 files and directories currently installed.)
Preparing to unpack .../hwinfo_21.6-1_amd64.deb ...
Unpacking hwinfo (21.6-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up hwinfo (21.6-1) ...


Though when I afterwards enter hwinfo it says that the command not found. man hwinfo works, i.e. the manual is shown, however locate hwinfo doesn't return anything.



I'm on Debian 8.1



dpkg-query -L hwinfo shows that hwinfo lives under /usr/sbin/hwinfo and calling this directly works too. So I suppose it is a path issue?










share|improve this question



















  • 4




    Try dpkg-query -L hwinfo to list what files the package actually installed on your system, and where.
    – steve
    Aug 2 '15 at 9:59










  • Thanks @steve. It has been installed under /usr/sbin/hwinfo. Should I just add this to my path?
    – pandita
    Aug 2 '15 at 10:06














up vote
2
down vote

favorite












I installed hwinfo using sudo apt-get install hwinfo and the system tells me that:



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
hwinfo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32.8 kB of archives.
After this operation, 90.1 kB of additional disk space will be used.
Selecting previously unselected package hwinfo.
(Reading database ... 192008 files and directories currently installed.)
Preparing to unpack .../hwinfo_21.6-1_amd64.deb ...
Unpacking hwinfo (21.6-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up hwinfo (21.6-1) ...


Though when I afterwards enter hwinfo it says that the command not found. man hwinfo works, i.e. the manual is shown, however locate hwinfo doesn't return anything.



I'm on Debian 8.1



dpkg-query -L hwinfo shows that hwinfo lives under /usr/sbin/hwinfo and calling this directly works too. So I suppose it is a path issue?










share|improve this question



















  • 4




    Try dpkg-query -L hwinfo to list what files the package actually installed on your system, and where.
    – steve
    Aug 2 '15 at 9:59










  • Thanks @steve. It has been installed under /usr/sbin/hwinfo. Should I just add this to my path?
    – pandita
    Aug 2 '15 at 10:06












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I installed hwinfo using sudo apt-get install hwinfo and the system tells me that:



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
hwinfo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32.8 kB of archives.
After this operation, 90.1 kB of additional disk space will be used.
Selecting previously unselected package hwinfo.
(Reading database ... 192008 files and directories currently installed.)
Preparing to unpack .../hwinfo_21.6-1_amd64.deb ...
Unpacking hwinfo (21.6-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up hwinfo (21.6-1) ...


Though when I afterwards enter hwinfo it says that the command not found. man hwinfo works, i.e. the manual is shown, however locate hwinfo doesn't return anything.



I'm on Debian 8.1



dpkg-query -L hwinfo shows that hwinfo lives under /usr/sbin/hwinfo and calling this directly works too. So I suppose it is a path issue?










share|improve this question















I installed hwinfo using sudo apt-get install hwinfo and the system tells me that:



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
hwinfo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32.8 kB of archives.
After this operation, 90.1 kB of additional disk space will be used.
Selecting previously unselected package hwinfo.
(Reading database ... 192008 files and directories currently installed.)
Preparing to unpack .../hwinfo_21.6-1_amd64.deb ...
Unpacking hwinfo (21.6-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up hwinfo (21.6-1) ...


Though when I afterwards enter hwinfo it says that the command not found. man hwinfo works, i.e. the manual is shown, however locate hwinfo doesn't return anything.



I'm on Debian 8.1



dpkg-query -L hwinfo shows that hwinfo lives under /usr/sbin/hwinfo and calling this directly works too. So I suppose it is a path issue?







debian apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 at 20:44









Rui F Ribeiro

38.3k1476127




38.3k1476127










asked Aug 2 '15 at 9:55









pandita

239420




239420







  • 4




    Try dpkg-query -L hwinfo to list what files the package actually installed on your system, and where.
    – steve
    Aug 2 '15 at 9:59










  • Thanks @steve. It has been installed under /usr/sbin/hwinfo. Should I just add this to my path?
    – pandita
    Aug 2 '15 at 10:06












  • 4




    Try dpkg-query -L hwinfo to list what files the package actually installed on your system, and where.
    – steve
    Aug 2 '15 at 9:59










  • Thanks @steve. It has been installed under /usr/sbin/hwinfo. Should I just add this to my path?
    – pandita
    Aug 2 '15 at 10:06







4




4




Try dpkg-query -L hwinfo to list what files the package actually installed on your system, and where.
– steve
Aug 2 '15 at 9:59




Try dpkg-query -L hwinfo to list what files the package actually installed on your system, and where.
– steve
Aug 2 '15 at 9:59












Thanks @steve. It has been installed under /usr/sbin/hwinfo. Should I just add this to my path?
– pandita
Aug 2 '15 at 10:06




Thanks @steve. It has been installed under /usr/sbin/hwinfo. Should I just add this to my path?
– pandita
Aug 2 '15 at 10:06










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










The name of a package isn't always the same as the name of any command it contains. You can use dpkg -L hwinfo | grep bin/ to list the commands it provides (or apt-file list hwinfo | grep bin/ before installation).



The hwinfo package does include a command called hwinfo, but it's /usr/sbin/hwinfo. The sbin directories (/sbin, /usr/sbin, /usr/local/sbin) contain commands that are meant to be used only by root. This doesn't necessarily mean that these commands won't work if called by another user, just that they're unlikely to be useful. The sbin directories are normally in the command search path only for the root user.



You can run /usr/sbin/hwinfo as a non-root user, but its report is incomplete; it needs root access for some of the information it queries. Therefore run sudo hwinfo or su -c hwinfo to get complete output, or /usr/sbin/hwinfo if incomplete output is sufficient.



You shouldn't add /usr/sbin to your PATH as most of the commands it contains cannot be usefully run as a non-root user.






share|improve this answer




















  • accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
    – pandita
    Aug 4 '15 at 9:05










  • @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
    – Gilles
    Aug 4 '15 at 9:25










  • So the alias will not prevent getting the full information when running sudo hwinfo then, right?
    – pandita
    Aug 4 '15 at 10:41










  • @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
    – Gilles
    Aug 4 '15 at 11:13

















up vote
2
down vote













By running dpkg-query -L hwinfo you can view all the files installed by this package, together with their location.



So likely installed as /usr/sbin/hwinfo. Add /usr/sbin to your $PATH variable if you want to run it with simply the command hwinfo rather than the full path+command /usr/sbin/hwinfo.






share|improve this answer




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f219730%2fhwinfo-not-found-after-seemingly-successful-install%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    The name of a package isn't always the same as the name of any command it contains. You can use dpkg -L hwinfo | grep bin/ to list the commands it provides (or apt-file list hwinfo | grep bin/ before installation).



    The hwinfo package does include a command called hwinfo, but it's /usr/sbin/hwinfo. The sbin directories (/sbin, /usr/sbin, /usr/local/sbin) contain commands that are meant to be used only by root. This doesn't necessarily mean that these commands won't work if called by another user, just that they're unlikely to be useful. The sbin directories are normally in the command search path only for the root user.



    You can run /usr/sbin/hwinfo as a non-root user, but its report is incomplete; it needs root access for some of the information it queries. Therefore run sudo hwinfo or su -c hwinfo to get complete output, or /usr/sbin/hwinfo if incomplete output is sufficient.



    You shouldn't add /usr/sbin to your PATH as most of the commands it contains cannot be usefully run as a non-root user.






    share|improve this answer




















    • accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
      – pandita
      Aug 4 '15 at 9:05










    • @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
      – Gilles
      Aug 4 '15 at 9:25










    • So the alias will not prevent getting the full information when running sudo hwinfo then, right?
      – pandita
      Aug 4 '15 at 10:41










    • @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
      – Gilles
      Aug 4 '15 at 11:13














    up vote
    1
    down vote



    accepted










    The name of a package isn't always the same as the name of any command it contains. You can use dpkg -L hwinfo | grep bin/ to list the commands it provides (or apt-file list hwinfo | grep bin/ before installation).



    The hwinfo package does include a command called hwinfo, but it's /usr/sbin/hwinfo. The sbin directories (/sbin, /usr/sbin, /usr/local/sbin) contain commands that are meant to be used only by root. This doesn't necessarily mean that these commands won't work if called by another user, just that they're unlikely to be useful. The sbin directories are normally in the command search path only for the root user.



    You can run /usr/sbin/hwinfo as a non-root user, but its report is incomplete; it needs root access for some of the information it queries. Therefore run sudo hwinfo or su -c hwinfo to get complete output, or /usr/sbin/hwinfo if incomplete output is sufficient.



    You shouldn't add /usr/sbin to your PATH as most of the commands it contains cannot be usefully run as a non-root user.






    share|improve this answer




















    • accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
      – pandita
      Aug 4 '15 at 9:05










    • @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
      – Gilles
      Aug 4 '15 at 9:25










    • So the alias will not prevent getting the full information when running sudo hwinfo then, right?
      – pandita
      Aug 4 '15 at 10:41










    • @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
      – Gilles
      Aug 4 '15 at 11:13












    up vote
    1
    down vote



    accepted







    up vote
    1
    down vote



    accepted






    The name of a package isn't always the same as the name of any command it contains. You can use dpkg -L hwinfo | grep bin/ to list the commands it provides (or apt-file list hwinfo | grep bin/ before installation).



    The hwinfo package does include a command called hwinfo, but it's /usr/sbin/hwinfo. The sbin directories (/sbin, /usr/sbin, /usr/local/sbin) contain commands that are meant to be used only by root. This doesn't necessarily mean that these commands won't work if called by another user, just that they're unlikely to be useful. The sbin directories are normally in the command search path only for the root user.



    You can run /usr/sbin/hwinfo as a non-root user, but its report is incomplete; it needs root access for some of the information it queries. Therefore run sudo hwinfo or su -c hwinfo to get complete output, or /usr/sbin/hwinfo if incomplete output is sufficient.



    You shouldn't add /usr/sbin to your PATH as most of the commands it contains cannot be usefully run as a non-root user.






    share|improve this answer












    The name of a package isn't always the same as the name of any command it contains. You can use dpkg -L hwinfo | grep bin/ to list the commands it provides (or apt-file list hwinfo | grep bin/ before installation).



    The hwinfo package does include a command called hwinfo, but it's /usr/sbin/hwinfo. The sbin directories (/sbin, /usr/sbin, /usr/local/sbin) contain commands that are meant to be used only by root. This doesn't necessarily mean that these commands won't work if called by another user, just that they're unlikely to be useful. The sbin directories are normally in the command search path only for the root user.



    You can run /usr/sbin/hwinfo as a non-root user, but its report is incomplete; it needs root access for some of the information it queries. Therefore run sudo hwinfo or su -c hwinfo to get complete output, or /usr/sbin/hwinfo if incomplete output is sufficient.



    You shouldn't add /usr/sbin to your PATH as most of the commands it contains cannot be usefully run as a non-root user.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 2 '15 at 19:30









    Gilles

    523k12610431576




    523k12610431576











    • accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
      – pandita
      Aug 4 '15 at 9:05










    • @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
      – Gilles
      Aug 4 '15 at 9:25










    • So the alias will not prevent getting the full information when running sudo hwinfo then, right?
      – pandita
      Aug 4 '15 at 10:41










    • @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
      – Gilles
      Aug 4 '15 at 11:13
















    • accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
      – pandita
      Aug 4 '15 at 9:05










    • @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
      – Gilles
      Aug 4 '15 at 9:25










    • So the alias will not prevent getting the full information when running sudo hwinfo then, right?
      – pandita
      Aug 4 '15 at 10:41










    • @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
      – Gilles
      Aug 4 '15 at 11:13















    accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
    – pandita
    Aug 4 '15 at 9:05




    accepted for the extra info on the sbin folder and advice around that. Out of interest, would it be ok to alias hwinfo=/usr/sbin/hwinfo or would that cause issues when using the command with sudo?
    – pandita
    Aug 4 '15 at 9:05












    @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
    – Gilles
    Aug 4 '15 at 9:25




    @pandita There's nothing wrong with that alias, except that you need to keep in mind that you'll get incomplete information.
    – Gilles
    Aug 4 '15 at 9:25












    So the alias will not prevent getting the full information when running sudo hwinfo then, right?
    – pandita
    Aug 4 '15 at 10:41




    So the alias will not prevent getting the full information when running sudo hwinfo then, right?
    – pandita
    Aug 4 '15 at 10:41












    @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
    – Gilles
    Aug 4 '15 at 11:13




    @pandita The alias won't even be triggered by sudo hwinfo. But anyway what matters is the user running the command, not how the shell was instructed to start the command.
    – Gilles
    Aug 4 '15 at 11:13












    up vote
    2
    down vote













    By running dpkg-query -L hwinfo you can view all the files installed by this package, together with their location.



    So likely installed as /usr/sbin/hwinfo. Add /usr/sbin to your $PATH variable if you want to run it with simply the command hwinfo rather than the full path+command /usr/sbin/hwinfo.






    share|improve this answer
























      up vote
      2
      down vote













      By running dpkg-query -L hwinfo you can view all the files installed by this package, together with their location.



      So likely installed as /usr/sbin/hwinfo. Add /usr/sbin to your $PATH variable if you want to run it with simply the command hwinfo rather than the full path+command /usr/sbin/hwinfo.






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        By running dpkg-query -L hwinfo you can view all the files installed by this package, together with their location.



        So likely installed as /usr/sbin/hwinfo. Add /usr/sbin to your $PATH variable if you want to run it with simply the command hwinfo rather than the full path+command /usr/sbin/hwinfo.






        share|improve this answer












        By running dpkg-query -L hwinfo you can view all the files installed by this package, together with their location.



        So likely installed as /usr/sbin/hwinfo. Add /usr/sbin to your $PATH variable if you want to run it with simply the command hwinfo rather than the full path+command /usr/sbin/hwinfo.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 2 '15 at 13:39









        steve

        13.8k22452




        13.8k22452



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f219730%2fhwinfo-not-found-after-seemingly-successful-install%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            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