I have a file with an ext4 file system in it and want to mount it without using sudo every time (the script should run with user rights). The file I want to mount and the folder which I want to mount it too both are in my home directory which is encrypted, so I can't put the file location into /etc/fstab
.
I tried fusermount
but I always get error messages like "fusermount: extra arguments after the mountpoint".
You can use
udiskctl
:Now, your file is mapped to a
block device
, and you can mount it as:when you're done, unmount is using:
finally, delete it by:
Have fun!
You can have it in /etc/fstab. My home directory is encrypted, yet:
GNOME Disk Image Mounter
Beside
udisksctl
andguestmount
(libguestfs-tools
) you can just:From manual:
gnome-disk-image-mounter
is part ofgnome-disk-utility
package, which also bringsgnome-disks
(run it with-h
for more info).gio mount
andudisksctl
.guestmount
libguestfs trickeryRelies on:
Docs: http://libguestfs.org/guestmount.1.html
Tested on Ubuntu 18.04, libguestfs-tools 1:1.36.13-1ubuntu3.