How do I find the kernel version, Ubuntu release and disk partition information from the terminal?

  • uname -a for all information regarding the kernel version,

    uname -r for the exact kernel version

  • lsb_release -afor all information related to the Ubuntu version,

    lsb_release -r for the exact version

  • sudo fdisk -l for partition information with all details.

    For more understandable information regarding paritions, please use commands given in other answers.


Kernel Version

cat /proc/version             # detail about for the kernel image version

Distribution Version

lsb_release -a

Partition Sizes

cat /proc/partitions          # for basic sizes
sudo fdisk -l /dev/<device>   # eg /dev/sda

Commands:

  • Kernel Version:

    uname -r
    
  • Distribution version number:

    lsb_release -sr
    
  • All partition sizes of the HDD in Terminal:

    lsblk -o NAME,SIZE
    

Example:

example

Tags:

Command Line