How do I find the kernel version, Ubuntu release and disk partition information from the terminal?
Solution 1:
-
uname -a
for all information regarding the kernel version,uname -r
for the exact kernel version -
lsb_release -a
for 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.
Solution 2:
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
Solution 3:
Commands:
-
Kernel Version:
uname -r
-
Distribution version number:
lsb_release -sr
-
All partition sizes of the HDD in Terminal:
lsblk -o NAME,SIZE
Example:
Solution 4:
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
Solution 5:
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