Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to know if an app exists that list all partitions, their filesystem type, and their possible identifiers.

This could help users in configuring their bootloaders.

For example:

Identifier      Grub Identifier     Filesystem Type     Size
 /dev/sda1       (hd0,2)             ext4                37GB
 /dev/sda4       (hd0,5)             NTFS                20GB

Is there an app with functionality similar to this that anyone knows of?

share|improve this question
is sudo fdisk -l what you are asking? It shows an id and it list 83 as 83 Linux native partition – Rinzwind Jul 19 '12 at 14:58
yeah, but i was thinking of something that would also list the (hdX,Y) stuff that grub needs.. It could be useful for users that aren't too familiar with the naming conventions – SirCharlo Jul 19 '12 at 15:06
+1 Nice idea , and Good Question :) – atenz Jul 19 '12 at 15:19
Try sudo sfdisk -l see if its what you want. – Mitch Jul 19 '12 at 15:28
well, it's interesting, but from a new user's point of view i think it's even more confusing than fdisk -l, what with all the additional info.. – SirCharlo Jul 19 '12 at 15:30
up vote 3 down vote accepted

Try using di

sudo apt-get install di


di -a

gives something close to your requirement

Filesystem         Mount               Size     Used    Avail %Used  fs Type              
/dev/sda8          /                  48.8G    14.0G    32.3G   34%  ext4                 
udev               /dev                1.9G     0.0G     1.9G    0%  devtmpfs             
devpts             /dev/pts            0.0M     0.0M     0.0M    0%  devpts               
gvfs-fuse-daemon   /home/user/.gvf     0.0M     0.0M     0.0M    0%  fuse.gvfs-fuse-daemon
/dev/sda5          /media/01CC6E45   293.0G   284.9G     8.1G   97%  fuseblk              
/dev/sda6          /media/01CC6E45   390.6G   355.6G    35.0G   91%  fuseblk              
/dev/sda7          /media/01CC6E45    97.7G    94.2G     3.5G   96%  fuseblk              
/dev/sda2          /media/0E246764    97.6G    34.1G    63.5G   35%  fuseblk              
/dev/sdb1          /media/748d0c01    20.0G     5.8G    13.2G   34%  ext4                 
/dev/sdb5          /media/f452a714    18.6G     7.2G    10.5G   44%  ext4                 
/dev/sdb4          /media/New Volu   255.5G    68.1G   187.4G   27%  fuseblk              
proc               /proc               0.0M     0.0M     0.0M    0%  proc                 
binfmt_misc        /proc/sys/fs/bi     0.0M     0.0M     0.0M    0%  binfmt_misc          
tmpfs              /run              772.7M     0.8M   771.9M    0%  tmpfs                
none               /run/lock           0.0M     0.0M     0.0M    0%  tmpfs                
none               /run/shm            0.0M     0.0M     0.0M    0%  tmpfs                
sysfs              /sys                0.0M     0.0M     0.0M    0%  sysfs                
none               /sys/fs/fuse/co     0.0M     0.0M     0.0M    0%  fusectl              
none               /sys/kernel/deb     0.0M     0.0M     0.0M    0%  debugfs              
none               /sys/kernel/sec     0.0M     0.0M     0.0M    0%  securityfs           

but without the Grub Identifier ( although the sda8 can be seen as (hd0,8) from Filesystem column) .And for entire disk information , all the available partitions needs to be mounted.

Another one is disktype but with more details including UUID

example sudo disktype /dev/sdx

Partition 6: 390.6 GiB (419423445504 bytes, 819186417 sectors from 819186480+63)
    Type 0x07 (HPFS/NTFS)
    Windows NTLDR boot loader
    NTFS file system
      Volume size 390.6 GiB (419423444992 bytes, 819186416 sectors)
  Partition 7: 97.65 GiB (104855837184 bytes, 204796557 sectors from 1638372960+63)
    Type 0x07 (HPFS/NTFS)
    Windows NTLDR boot loader
    NTFS file system
      Volume size 97.65 GiB (104855836672 bytes, 204796556 sectors)
  Partition 8: 48.89 GiB (52500103168 bytes, 102539264 sectors from 1843169580+1748)
    Type 0x83 (Linux)
    Ext3 file system
      UUID 0F493AF5-3B1C-49A5-B33E-5E04F42CA0F1 (DCE, v4)
      Last mounted at "/"
      Volume size 48.89 GiB (52500103168 bytes, 12817408 blocks of 4 KiB)
  Partition 9: 3.725 GiB (3999268864 bytes, 7811072 sectors from 1945712475+165)
    Type 0x82 (Linux swap / Solaris)
    Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
      Swap size 3.725 GiB (3999260672 bytes, 976382 pages of 4 KiB)
share|improve this answer
Good answer. Not exactly what I was looking for, but I'll accept it anyway! Thanks. – SirCharlo Aug 11 '12 at 4:32

You don't need to install anything, just:

ls /dev/disk/by-uuid -lah

gives you for example:

lrwxrwxrwx 1 root root  10 Jun 27 10:56 7d4d0682-4f05-41d7-b3a3-871799e1014c -> ../../sda1
lrwxrwxrwx 1 root root  10 Jun 27 10:56 a22643b0-8de4-4feb-859a-1ba7eb84bf2f -> ../../sda5
share|improve this answer

You can try to use gparted or lparted.

share|improve this answer

Another choice, installed by default on 12.04:

sudo lsblk -f

There are options to display fields, remove headers, etc.

sudo blkid 

may also be useful, depending upon what you find easier to parse.

I don't think it will be easy to find a standard utility to convert to the grub nomenclature. The shell program /usr/lib/grub-legacy/update-grub has some shell script functions that do the conversion.

share|improve this answer

Your Answer


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.