Shell Script to fetch CPU, Memory and Disk Info in Linux

This is a script to populate computer hardware configuration in Linux.

Script to populate CPU, Memory and Disk Info
1
2
3
4
5
6
7
8
9
#!/bin/bash
# CPU
cat /proc/cpuinfo | grep -e "model name" -e "cores" -m 2 && cat /proc/cpuinfo | grep -e "physical id"| sort | uniq -c
# Memory
free -got
# Disk
df -lh -t ext4 --total