10 Useful Commands to Collect System and Hardware Information in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

30 Responses

  1. Moltke says:

    Where do the html output goes to? I tried the lshw >html but I can’t find it anywhere. By the way, I was curious whether running lshw>txt would work, but it didn’t lol

    • Ravi Saive says:

      @Moltke,

      The html file created in your current working directory, for example if you run the following command from /home/username, the output of html will be created under /home/username, that you can check with ls command.

      # sudo lshw -html > lshw.html
      # ls
      
      • Moltke says:

        Thank you for your answer. Yes, after posting the question it occurred to me to check the capture again and there it was; /home/username on the search bar, so I went to my home folder and found it.

        Felt a little bit like a fool and wanted to delete the comment but it is not possible to do so :)…thanks again for your answer. And nice article! I’m a big fan of this site, always come to check what’s new and always find some really useful articles like this one.

        By the way, if I were to do some “benchmarks” on Linux systems, what is the best way to do so? Something else than top, htop or the likes.

        I’m running some VMs under virtualbox and I’m curious if it is possible to do and how. I’d like to do that to compare them all cause I’m creating a wiki with all the tests I’ve done so far for personal use and who knows, maybe even upload it onto the web!!

        • Aaron Kili says:

          @Moltke

          You can use:
          1. glances – a top-like monitoring tool with modern features compared to top
          2. smem – reports memory consumption per-process and per-user basis in Linux
          3. stress-ng – impose high CPU load and run stress test
          4. And there are lot’s of other tools you can find here: 20 Command Line Tools to Monitor Linux Performance

          These are obviously not the only tools, but i believe using a collection of various tools/utilities can help you come up with accurate and more reliable results. Thanks.

          • Moltke says:

            Thanks for your answer. I’ve used glances and it is quite useful. The other ones haven’t used them yet, but I will.

            On Linux system where systemd is present, it’s possible to use some command line utilities to gather information about boot time, CPU usage and more, what can I use to do this in those ones where it is not?.

            Also, the mesa-utils offer the capability to run tests on graphics performance. However, this is a lot of information to process and it is much time consuming, is there such a software/tool which I can use for gathering this information altogether?

            I think probably not, but if you don’t mind I’d like to post the question, is there any? In the link you provided I see collectl, and it certainly looks like the perfect tool to accomplish what I want, or at least most of it, so I’ll try it and see what’s capable of. Thanks again for taking the time to answer. :)

  2. Michael says:

    You can also use smartctl to check your drives, hpasmcli/hpacucli for hp servers, and ipmitool sdr list to see information about your sensors, fans, etc.

  3. Kerhep Gasue says:

    How can i check hardware in other PCs in networks that has Linux on board? I have been using 3rd party GUI computer hardware inventory
    from Softinventive Lab software but it`s too pricy. Any clues?

    • Aaron Kili says:

      @Kerhep

      I suppose you mean checking PC hardware info from a Linux machine, we have not come across any specific tools for that purpose, however, you can use network monitoring tools such as Nagios, Zabbix, Monitorix and many more. Although, they may not offer detailed hardware info from PCs.

    • Mssm says:

      You could use “ansible” which is great tool mainly used for automation, orchestration, which can also handy for running standalone commands, which can just use native ssh protocol to query end device and pull out complete hardware dump and show it.

      This is again open source, however, there is an enterprise version called “ansible tower” for which u would need license. Ansible is belongs to Red Hat now.

      • Aaron Kili says:

        @Mssm

        Thanks for the clear, descriptive and above all useful feedback. I’ll surely try it out and hope every user who has faced the same issue as @Kerhap Gause will as well.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 257,757
  2. 11,967
  3. 39,682

Are you subscribed?