How to Encrypt a Drive on Ubuntu 18.04

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!

Sandclock 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, Sandclock 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

Ubuntu Killall Command

Every single Linux distros is a collection of standard and something other tools at the core. Ubuntu, being one of the...

Install Raspbian on Raspberry Pi

Raspberry Pi is an ARM based single board computer. Raspbian is a Debian based GNU/Linux distribution for Raspberry Pi....

[SSH] [Mobaxterm] Hướng dẫn sử dụng MobaXterm để SSH vào server linux

Đối với các hệ điều hành của họ Linux như CentOS, Ubuntu, Fedora, Debian … thì việc điều khiển...
Bài Viết

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

Hướng dẫn chuyển đổi windows server windows evaluation to standard và active windows server 2008 + 2012 + 2016 + 2019

How to Update Ubuntu Linux

Squid Proxy Manager cài đặt và quản lý Proxy Squid tự động trên ubuntu

Hướng dẫn cài đặt Apache CloudStack

Hướng dẫn ký file PDF bằng chữ ký số (chữ ký điện tử) và sửa lỗi mới nhất 2021 foxit reader