KK Patel Asked: 2012-09-04 01:07:12 +0800 CST2012-09-04 01:07:12 +0800 CST 2012-09-04 01:07:12 +0800 CST How do I find the kernel version, Ubuntu release and disk partition information from the terminal? 772 Which commands will give me information about following using Terminal? Kernel Version Distribution version no. All partition size of the HDD command-line 7 Answers Voted Best Answer Web-E 2012-09-04T01:12:01+08:002012-09-04T01:12:01+08:00 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. Jeremy Kerr 2012-09-04T01:12:12+08:002012-09-04T01:12:12+08:00 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 MrVaykadji 2014-03-07T07:27:07+08:002014-03-07T07:27:07+08:00 Commands: Kernel Version: uname -r Distribution version number: lsb_release -sr All partition sizes of the HDD in Terminal: lsblk -o NAME,SIZE Example: Maythux 2014-03-07T07:00:12+08:002014-03-07T07:00:12+08:00 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 penreturns 2012-09-04T02:29:29+08:002012-09-04T02:29:29+08:00 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 Beginner 2014-03-01T22:53:13+08:002014-03-01T22:53:13+08:00 uname -r sudo fdisk -l lsb_release -a user183551 2017-09-05T19:37:49+08:002017-09-05T19:37:49+08:00 To find the exact distribution, that is Ubuntu 16.04.1 or Ubuntu 16.04.3 you would use lsb_release -d
uname -a
for all information regarding the kernel version,uname -r
for the exact kernel versionlsb_release -a
for all information related to the Ubuntu version,lsb_release -r
for the exact versionsudo fdisk -l
for partition information with all details.For more understandable information regarding paritions, please use commands given in other answers.
Kernel Version
Distribution Version
Partition Sizes
Commands:
Kernel Version:
Distribution version number:
All partition sizes of the HDD in Terminal:
Example:
Kernel version is:
Ubuntu release version is:
All partition size of the HDD in Terminal
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 alsolsb_release -a
return all not only Ubuntu version moreoversudo fdisk -l
return the block numbers and size and not human readable informationOpen terminal. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.
uname -r
sudo fdisk -l
lsb_release -a
To find the exact distribution, that is Ubuntu 16.04.1 or Ubuntu 16.04.3 you would use