How to Encrypt a Drive on Ubuntu 18.04

29/12/2020
Chưa phân loại
Encryption is the best way to ensure your security of your personal info and other credentials. In the current world, encryption is the final option that we can only trust. That being said, if you have a personal computer, encrypting it is also one of the best ways to tighten your security.

Today, let’s take a look on encrypting your drive on Ubuntu 18.04. Note that all the Ubuntu flavors and Ubuntu-based distros will support the guides. No need to worry about compatibility.

Understanding the pros and cons

Encrypting a drive has both its benefits and disadvantages. Let’s talk about them first.

The benefits are numerous.

  • Increased privacy protection.
  • No one can break the data, not with current technology. Even cracking a single file may take 1000+ years.

There are some disadvantages as well.

  • If you forget the key, the data is as good as lost.
  • Data recovery is impossible.
  • The partition won’t be accessible to other systems and may cause SERIOUS compatibility issues.

For the protection of the data, you must remember the pass phrase, no matter what.

Encrypting machine’s host drive

Well, let’s jump into the encryption part. Whenever you install Ubuntu, you can have an encrypted drive right away. If you don’t remember how to install Ubuntu, let’s check out installation procedure of Ubuntu 18.04.

Thanks to the power of VirtualBox, we’re right into the installation of Ubuntu 18.04!

As soon as you arrive at this stage, check the option to encrypt the new Ubuntu installation for security. Choosing the LVM option is optional but good if you go with that.

At the next step, you’ll have to choose the security key that you’ll have to enter each time your computer boots up.

Continue the installation normally. Note that you will have to configure another password for logging into your user account.

Complete the installation as usual and restart the system.

Once the system starts, you will have to enter the passkey for the encrypted drive. Without the pass key, system won’t boot either. There’s literally no way to bypass it, literally NO WAY!

Encrypting a USB flash drive

Do you have a personal USB flash drive? Want to encrypt it? Let’s do it!

At first, we need a tool – GNOME Disk Utility. Run the following commands to install it –

sudo apt update && sudo apt upgrade -y

sudo apt install gnome-disk-utility cryptsetup

Start the disk utility tool. It should be present with the name – Disks.

Now, connect the USB flash drive.

Unmount the drive’s partition.

After unmounting, time to format the drive. That’s why make sure that the drive doesn’t contain any important data beforehand.

Select to format with “Ext4” file system and LUKS enabled. You can choose to erase but it will take longer time depending on the size of the drive/partition.

Create a password for the new encrypted partition.

Confirm every details and format the drive. Wait until the process finishes.

Now, you can see that the drive has a protected partition. You can easily lock it down with one click.

Each time you access the drive, you’ll have to enter the passphrase.

Similarly, you can perform the lock any partition present in your system. Make sure to back up all the important data present as the formatting step will make them unavailable.

Voila! Happy encryption!

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Debian VS Ubuntu: Is There a Clear Winner?

Debian and Ubuntu have many things in common, and it’s only natural for Linux users to wonder whether one is better than...
28/12/2020

Best Zorin OS Wallpapers

Wallpaper is the very first thing that welcomes you when you log in to your computer. We may not feel like it but the sensory...
29/12/2020

Kubernetes Metrics Server

With a system as large and complicated as Kubernetes, monitoring can often become troublesome.Monitoring is always a tricky...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025

Dịch Vụ Thiết Lập Hệ Thống Tường Lửa (Firewall)
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ảo Hóa & Cloud
04/04/2025

Dịch Vụ Triển Khai Hệ Thống Ceph
04/04/2025