I'm new to linux but can't find any answers elsewhere.

I have a vanilla RHEL 7.1 installation and I want to run dmidecode and lshal, but when I attempt to run it it says "bash: command not found" for both these commands

I have tried /usr/bin and /usr/sbin

Would these commands be in another folder or do they have to be installed ? If the latter, how do I install them ? or are there alternatives..etc !


  • 1
    Have you tried to install it using "yum install dmidecode",? – davidgo Jul 14 '18 at 18:54

dmidecode should come with your RHEL 7 install but for good measure run this command to check if it's installed:

rpm -qil dmidecode

You should get a bunch of information regarding the package. Look for the "Installed Date" line for confirmation. If it's not installed, try a quick:

sudo yum install dmidecode

dmidecode may intentionally be omitted from the install if your system architecture is IBM System Z, PowerPC, or Itanium. From the RHEL customer portal(requires login to view fully):

IBM System z (s390) and PowerPC architectures do not use the DMI standard and, consequently, do not have DMI tables to decode, so there is no dmidecode utility available in Red Hat Enterprise Linux for IBM System z (s390) or PowerPC systems. If the python-dmidecode module is installed on these systems, however, the module can read supplied DMI data from x86-based systems.

Also, from this RHEL bugzilla page:

...dmidecode should be present in both the i386 and x86_64 kernel-utils, but is not in the powerpc or itanium versions (though in glancing through the spec file, it looks like we do mention dmidecode even on those platforms)

If your system architecture is one of the above, you may consider an alternative such as lshw or hwinfo. You can make use of the arch or uname -m commands to show your system architecture.

If you're running a supported platform for dmidecode, consider filing a bug at the location of that second link above^

  • 1
    Thanks your comment inspired me to look at installing dmidecode and I found that "yum install dmidecode" did just that. This is just a vmware vm that we use for testing stuff that we don't even really understand ! So presumably the guy who set this up didn't tick the right options and dmidecode didn't arrive. Now that I've run that yum command it works. He also didn't install a gui, so when we boot it its just a terminal screen. We're not supported - just a windows dev team that have to do a bit of linux occasionally – user2728841 Jul 14 '18 at 19:04
  • 1
    ^^ posted before your edit. but thats clearly the answer, so thanks again – user2728841 Jul 14 '18 at 19:08
  • 1
    Yeah, just a quick edit to make things more comprehensive. Thanks and glad you're up and running with it now :) – baelx Jul 14 '18 at 19:09

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.