Archives by date

You are browsing the site archives for November 2016.

How To Find Basic Linux Hardware Info

You can use the below to find some basic information about the hardware your Linux system is installed on:

How much RAM is installed and how much of it is in use (megabytes)?

$ free -m
 total used free shared buffers cached
Mem: 3949 3189 760 0 599 1594
-/+ buffers/cache: 995 2954
Swap: 16386 109 16277

Processor type:

$ cat /proc/cpuinfo

Check the size of the hard drive and what hard drives are available in the system.
This command will also list USB drives and sticks. You need root permissions to execute the fdisk command:

$ sudo fdisk -l | grep GB
Disk /dev/sda: 42.9 GB, 42949672960 bytes
Disk /dev/sdb: 107.3 GB, 107374182400 bytes

UPDATE 01-04-2018: Another handy command for finding disk space is “df”:

$ df
Filesystem                  1K-blocks    Used Available Use% Mounted on
/dev/mapper/rootvg-usrlv      5232640 1856376   3376264  36% /usr
/dev/mapper/rootvg-homelv     8378368  189912   8188456   3% /home
/dev/sda1                      520868  122896    397972  24% /boot

Got any other tips for me?

How To Find Your Linux Version

I’ve been doing a few things in Linux lately and needed a couple things like: What version of Linux am I using?

$ lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Release: 5.5
Codename: Carthage

This Linux stuff is a little new for me, so hope that helps someone else out there.