Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux command to list file systems available for mounting?

What terminal command will return data that includes the file systems that are currently available for mounting on my system?

Specifically, I am using Ubuntu 15.04, though I would prefer an answer that is valid for all *nix users.

NOTES: I don't want to know what IS mounted, I want to know what is available. I don't want to check the type of file system (ext2, ext4, ntsf, etc.), I want to know which file systems are available to be mounted (sda2, fd1, etc.).

like image 270
Jonah Havel Avatar asked Mar 27 '16 21:03

Jonah Havel


People also ask

How do I check if a mount is available in Linux?

The command findmnt lists all mount points. To do this the findmnt reads files /etc/fstab, /etc/fstab. d, /etc/mtab or /proc/self/mountinfo.

Which command is used to see all mount file system?

Use the lsfs command to display information about mount points, permissions, file system size and so on.

How do I list mounted partitions?

The mount -l command (or just mount) is often used to list all mounted partitions on a system, while fdisk -l is often used to list all partitions from any device which contains a partition table (a hard disk being the most common example).


1 Answers

On Ubuntu you can use to show discs:

sudo lshw -class disk

or to check all partitions on your system

sudo blkid -o list | grep "not mounted"

or if you just want the device:

sudo blkid -o list | grep "not mounted" | awk '{print $1}'
like image 106
Dan-Dev Avatar answered Sep 28 '22 08:09

Dan-Dev