Last active
April 11, 2017 14:13
-
-
Save p404/1d23e0f77af0334eb2be to your computer and use it in GitHub Desktop.
Hardware Info Linux script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
echo "Hardware Info" | |
# CPU | |
echo "CPU $(cat /proc/cpuinfo | grep 'model name' | uniq)" | |
echo "Cores : $(cat /proc/cpuinfo | grep processor | wc -l)" | |
echo "Physical cores: $(cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l)" | |
# RAM | |
echo "RAM : $(dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s / 1024}')G" | |
# Disk space | |
echo "Total Disk Space : $(df -h --total | grep 'total' | awk '{print $2}')" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment