Linux – Redhat linux 7 – dmidecode – command not found

command linelinux

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 !

thanks

Best Answer

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^

Related Question