How to get system info in Linux

Here are some useful commands that you can use to find (almost) every information that you want to know about your system from the command line. Most of this commands can be run as non-privileged user, but more information can be obtained if (and should be) run as root.

General system information:
# uname -a
Process information:
# top

(Shift-M to order the list by memory use)

Memory information:
# free -m
BIOS information:
# dmidecode | less
Distro information:
Ubuntu: # lsb_release -a
Redhat/Mandriva/Fedora/SuSe:  # cat /etc/osname_version
Devices:
# lspci -tv
# lsusb
# lshw
# lsmod |less
Partitions:
# fdisk -l
Memory usage:
# free -m
Mounted filesystem:
# df -hT
Disk usage:
# du / -bh | more
Disk performance:
# hdparm -t /dev/hda
IP adress:
# route -n
# ifconfig -a
Ethernet adapter:
# ethtool -i eth0

The /proc directory (cpuinfo, devices, filesystems, meminfo, partitions, uptime,  etc.)

E.g.:

# cat /proc/cpuinfo
# cat /proc/version
# cat /proc/swaps

 

Source


About this entry