From the course: Security Tips: Protecting Sensitive Information

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Encrypted disk image using LUKS on Linux

Encrypted disk image using LUKS on Linux

- [Instructor] Another option for encrypting a volume with LUKS is to create an encrypted disk image file on a regular disk. To do that, we'll first create a disk image and then we'll use LUKS to secure it. I'll create a disk image with a dd command. This creates a sparse file with a capacity of one gigabyte. And if you need a different amount of space, you can adjust the seek number accordingly. Once the file is created, we'll use crypt setup to make an encrypted volume within the file and format it so that it can be used to store files. Then to use the new encrypted disk image, we'll need to open it and mount it, just as we saw a moment ago when working with an encrypted disk. I'll go through the steps a bit quicker here to save time. First, I'll open the volume and map it. Then I'll create a mount point and mount the volume. And the first time I use it here, I'll make sure my user can write to it. And there we go.…

Contents