Uploaded March 2018 | Updated September 2026, 2 weeks ago
Always encrypt your sensitive data, especially if is it stored on external hard drives or flash drives.
This video shows how to encrypt your hard drive in Linux. Using this method you can encrypt a separate partition, a whole hard drive or just your USB stick.
I personally use the most LUKS and dm-crypt encryption. I believe it is a simple and reliable way to protect your data.
BTW, If you like the theme, I showed it here youtu.be/osA-ZEEz6Zw
These are the commands shown in the video:
sudo apt install cryptsetup
sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1
sudo cryptsetup luksOpen /dev/sdb1 sdb1
sudo fdisk -l
sudo mkfs.ext4 /dev/mapper/sdb1
sudo tune2fs -m 0 /dev/mapper/sdb1
sudo mkdir /mnt/encrypted
sudo mount /dev/mapper/sdb1 /mnt/encrypted
sudo touch /mnt/encrypted/test.txt
sudo chown -R `whoami`:users /mnt/encrypted
sudo umount /dev/mapper/sdb1
sudo cryptsetup luksClose sdb1
lsblk
sudo cryptsetup luksOpen /dev/sdb1 sdb1
sudo mount /dev/mapper/sdb1 /mnt/encrypted
sudo umount /dev/mapper/sdb1
sudo cryptsetup luksClose sdb1
################################################
Support on Patreon: patreon.com/averagelinuxuser
Donate through PayPal: paypal.me/Kryvokhyzha
################################################
More cool Linux stuff at other social media:
Google+ - Best Linux Stuff: plus.google.com/+AverageLinuxUser
Facebook - Top Linux Tips: facebook.com/AverageLinuxUser
Twitter - Daily Linux News: twitter.com/AVGLinuxUser
Website: averagelinuxuser.com
Always encrypt your sensitive data, especially if is it stored on external hard drives or flash drives.
This video shows how to encrypt your hard drive in Linux. Using this method you can encrypt a separate partition, a whole hard drive or just your USB stick.
I personally use the most LUKS and dm-crypt encryption. I believe it is a simple and reliable way to protect your data.
BTW, If you like the theme, I showed it here youtu.be/osA-ZEEz6Zw
These are the commands shown in the video:
sudo apt install cryptsetup
sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1
sudo cryptsetup luksOpen /dev/sdb1 sdb1
sudo fdisk -l
sudo mkfs.ext4 /dev/mapper/sdb1
sudo tune2fs -m 0 /dev/mapper/sdb1
sudo mkdir /mnt/encrypted
sudo mount /dev/mapper/sdb1 /mnt/encrypted
sudo touch /mnt/encrypted/test.txt
sudo chown -R `whoami`:users /mnt/encrypted
sudo umount /dev/mapper/sdb1
sudo cryptsetup luksClose sdb1
lsblk
sudo cryptsetup luksOpen /dev/sdb1 sdb1
sudo mount /dev/mapper/sdb1 /mnt/encrypted
sudo umount /dev/mapper/sdb1
sudo cryptsetup luksClose sdb1
################################################
Support on Patreon: patreon.com/averagelinuxuser
Donate through PayPal: paypal.me/Kryvokhyzha
################################################
More cool Linux stuff at other social media:
Google+ - Best Linux Stuff: plus.google.com/+AverageLinuxUser
Facebook - Top Linux Tips: facebook.com/AverageLinuxUser
Twitter - Daily Linux News: twitter.com/AVGLinuxUser
Website: averagelinuxuser.com










