//Cloud notes from my desk -Maheshk

"Fortunate are those who take the first steps.” ― Paulo Coelho

[Linux] Commands to collect CPU, BIOS, MEM, HW details in one go

At times, you wanted to run a script in on-prem or in cloud to understand the Linux Machine spec, this script (series of commands) helps you to get that info easily.

1. To get the CPU info,
$ lscpu
2. To get the H/w info,
$ lshw -short
3. To get the H/w info2,
$ hwinfo –short
4. To get the Diskblocks,
$ lsblk
5. To get the mounted disk,
$ df -hT
6. To get the attached disk,
$ fdisk -l
7. To get the memory,
$ free -m
8. To get the OSVersion,
$ cat /proc/version
9. To get the HW CPU,
$ dmidecode -t processor (cpu), $ dmidecode -t memory (memory), $ dmidecode -t bios (bios)

Hint: You could save this as bash script(#/bin/bash) and then cat out to individual file to /tmp/ so that we can get all of them in one go.

2019-05-07 - Posted by | Linux, Uncategorized |

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: