0% found this document useful (0 votes)
15 views

System Information - Linux Command Library

Uploaded by

abinadabhp13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

System Information - Linux Command Library

Uploaded by

abinadabhp13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

12/2/24, 10:09 System information | Basic | Cheat sheet | Linux Command Library

LINUX COMMAND LIBRARY

BASICS TIPS COMMANDS

System information
CPU usage in percentage Bluetooth name
$ HZ=` awk '/\\#define HZ/ { print $3}' /usr/i $ hciconfig -a | awk '/Name:/ { print $2}'
nclude/asm-
generic/param.h`; NUMCPUS=` grep ^pro
c /proc/cpuinfo | wc - Network interfaces
l`; FIRST=` cat /proc/stat | awk '/^cpu / { p
rint $5}'`; sleep 1; SECOND=` cat /proc/st $ ifconfig -a
at | awk '/^cpu / { print $5}'`; USED=` echo
4 k 100 $SECOND $FIRST - $NUMCPUS $ ip a
$HZ \\* / 100 \\* - p | dc`; echo ${USED}
$ NUMCPUS=` grep ^proc /proc/cpuinfo | Memory information
wc -
l`; FIRST=` cat /proc/stat | awk '/^cpu / { p $ cat /proc/meminfo
rint $5}'`; sleep 1; SECOND=` cat /proc/st
at | awk '/^cpu / { print $5}'`; USED=` echo
2 k 100 $SECOND $FIRST - $NUMCPUS Info about the linux system
/ - p | dc`; echo ${USED}%
$ cat /proc/version
$ uname -a
Laptop battery in percentage
$ neofetch
$ max=$( grep 'last full capacity:' /proc/acp
i/battery/BAT1/info| awk '{ print $4}') ; curre
nt=$( grep 'remaining capacity:' /proc/acpi/
battery/BAT1/state| awk '{ print $3}'); perce
PCI devices
nt=$( expr $current'00' / $max ); echo - $ lspci
e $percent
$ upower -i $( upower -
e | grep BAT) | grep --color=never - USB devices
E percentage| xargs| cut -d' ' -f2| sed s/%//
$ lsusb
$ cat /sys/class/power_supply/BAT1/ueven
t | awk '/POWER_SUPPLY_CAPACITY/ {
print $1}' | sed 's/POWER_SUPPLY_CAP Block devices (except RAM disks)
ACITY=//' in a tree-like format
$ lsblk
Bluetooth MAC address
$ hciconfig -
a | awk '/BD Address:/ { print $3}'

https://linuxcommandlibrary.com/basic/systeminformation 1/2
12/2/24, 10:09 System information | Basic | Cheat sheet | Linux Command Library

Uptime of machine Bootlog info


$ uptime $ cat /var/log/boot.log

Disk usage info Show a small months calender


$ df -k $ cal

All man pages are copyrighted by their respective authors. Thanks to TLDR and commandlinefu.com
Simon Schubert - [email protected]

My other projects:

https://linuxcommandlibrary.com/basic/systeminformation 2/2

You might also like