Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Which commands will give me information about following?

  1. Kernel Version
  2. Distribution version no.
  3. All partition size of the HDD in Terminal
share|improve this question

6 Answers 6

up vote 92 down vote accepted
  • uname -a for all info regarding kernel version,

    uname -r for exact kernel version

  • lsb_release -afor all information related to ubuntu version,

    lsb_release -r for exact version

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

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

share|improve this answer
1  
Not correct uname -a return all not just kernel version also lsb_release -a return all not only Ubuntu version moreover sudo fdisk -l return the block numbers and size and not human readable information –  Ask Mar 6 at 15:01
    
It's a great answer, however, instead of all the information (-a option switch used in Web-E's answer) you can just get the specific numbers. This is much less confusing for a beginner - For this reason I prefer MrVaykadji and Hadi improvements. –  RichardWigley Apr 14 at 10:02

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
share|improve this answer

Commands :

  • Kernel Version :

    uname -r
    
  • Distribution version no. :

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

    lsblk -o NAME,SIZE
    

Example :

example

share|improve this answer
    
what terminal is that? how did you get that triangle? –  NullVoxPopuli Aug 17 at 16:16

Kernel version is:

uname -r

Ubuntu release version is:

lsb_release -r

All partition size of the HDD in Terminal

df -ht ext4

replace ext4 with your FS type if it's not so


With respect to the marked as answer post:

Not correct uname -a return all not just kernel version also lsb_release -a return all not only Ubuntu version moreover sudo fdisk -l return the block numbers and size and not human readable information

share|improve this answer

Open terminal. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo fdisk -l; uname -a; lsb_release -a
share|improve this answer

uname -r

sudo fdisk -l

lsb_release -a

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.