Table of Contents

Mounting And Unmounting File Volumes

Let's say that you inspect an .img file using a command like this:

$ file foobackup.img
foobackup.img: LUKS encrypted file, ver 1 [aes, xts-plain64, sha1] UUID: d57de975-af81-4f77-b770-4abcdbogus8a

You would mount it with the following commands:

$ sudo cryptsetup luksOpen ./foobackup.img foobackup
Enter passphrase for foobackup.img: 
$ mkdir /tmp/foobackup # or whatever
$ sudo mount /dev/mapper/foobackup /tmp/foobackup

That's it. Once you're done with the partition, you can unmount it like so:

$ sudo umount /tmp/foobackup
$ sudo cryptsetup luksClose foobackup

Last Updated .