Ubuntu: How to find the path of an mounted iso file?


I want the full path of the original iso file which was mounted into a (lets say /media/iso) directory. I don't know how to get that iso file path.

I tried lsblk,sudo blkid commands but nothing seems to work.

How do i find the path of an iso file which is currently mounted? Is there any command for that?


Run the below command on terminal to view the original iso file path which is mounted inside /media/iso directory,

mount | awk '/\/media\/iso/ { print $1}'  

To see the whole line(iso path location and the mount point),

mount | awk '/\/media\/iso/ { print $0}'  


mount | grep /media/iso  

In the above /media/iso is the mountpoint where the iso file is actually mounted./\/media\/iso/ in the awk command is a regular expression to grab a line which contains the name /media/iso.You have to escape the forward slahes(like /\/media\/iso/) while you give it on an awk search regex.

$ mount | grep /media/iso  /usr/share/virtualbox/VBoxGuestAdditions.iso on /media/iso type iso9660 (ro)  $ mount | awk '/\/media\/iso/ { print $1}'  /usr/share/virtualbox/VBoxGuestAdditions.iso  $ mount | awk '/\/media\/iso/ { print $0}'  /usr/share/virtualbox/VBoxGuestAdditions.iso on /media/iso type iso9660 (ro)  

You can also search by the file type as,

$ mount | awk '/iso9660/ { print $1}'  /usr/share/virtualbox/VBoxGuestAdditions.iso  $ mount | awk '/iso9660/'  /usr/share/virtualbox/VBoxGuestAdditions.iso on /media/iso type iso9660 (ro)  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »