Jury A
Jury A

Reputation: 20092

How can I know the currently attached volumes in linux

I am using an ubuntu EC2 amazon machine. I need to know the currently attached volumes. I used the following command:

cat /proc/partitions

But, I get: cat: proc/partitions: No such file or directory. When I checked proc directory, I found it empty. How can I figure out the currently attached volumes and their names ?

Upvotes: 2

Views: 1260

Answers (1)

Shiplu Mokaddim
Shiplu Mokaddim

Reputation: 57680

To get proc file system you might need to mount it.

mount proc /proc

To get list of partitions I use following commands. Each of them gives list of partitions.

fdisk -l 
parted -l
df -h
mount

Note: mount only displays list of volumes currently mounted and df shows statistics of mounted volumes.

Upvotes: 5

Related Questions