- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Security

Encrypting Storage Devices
In this hands-on lab, we will learn how to encrypt a storage medium, such as a USB stick or SD card. When a storage device is encrypted, no one can access the data on it without the correct key. That way, even if you lose the device, the data on the device will remain secret.

Lab Info
Table of Contents
-
Challenge
Install the `cryptsetup` Utility
- Run the following command:
sudo yum install cryptsetup-luks
-
Challenge
Encrypt and Format the Storage Device
- List all of the available storage devices.
sudo fdisk -l
- Locate the device that is approximately 3 GB in size and has no partitions.
- Encrypt and format the device.
sudo cryptsetup -y -v luksFormat <DEVICE_NAME>
-
Challenge
Configure the Storage Device
- Open the device.
sudo cryptsetup luksOpen <DEVICE_NAME> LA
- Check the status of the device.
sudo cryptsetup -v status LA
- Find the header information for the device.
sudo cryptsetup luksDump <DEVICE_NAME>
- Clear the device.
sudo dd if=/dev/zero of=/dev/mapper/LA bs=128
- Create a filesystem on the device.
sudo mkfs.ext4 /dev/mapper/LA
- Create a new directory to serve as the mount point.
mkdir LA
- Mount the filesystem.
sudo mount /dev/mapper/LA LA/
-
Challenge
Unmount and Lock the Device
- Unmount the device.
sudo umount LA/
- Lock the device.
sudo cryptsetup luksClose LA
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.