How to Encrypt Home Folder in Linux

Windows Articles

The best lightweight web browsers

Hi! We currently spend a lot of time in front of the computer connected to the Internet. In fact, it is a...

Install Snowflake (SSH Client) on Ubuntu 20.04

Linux system administrators on servers have a big job behind them. Thanks to them, many of the services or tasks that an...

How to install Trisquel 9.0

A few days ago we talked about the release of Trisquel 9.0, this distro is based on the Ubuntu 18.04 LTS packages....

Learn about the Ramnit threat and how to remove it from Windows 10.

Hello! There are computer security threats that can appear spontaneously. But, then they may not last long. On the other hand, malware...

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

If you’re on Linux, you already have the idea of the security level of this awesome operating system. This has set up all the systems in such a manner that until you give the permission, there’s hardly any malware to run into your system. However, despite the security, your data isn’t completely secured. Those who have physical access to your system can easily extract your sensitive data.

For solving this issue, you can set up encryption for your “home” folder. This way, no one can extract sensitive information out of your system and even if they do so, it’ll be nothing more than garbage & unreadable data. Let’s get started with encrypting your “home” folder on your Linux distro.

Note that I’m using Linux Mint. But the system procedure is the same for all the other Linux distros. We’ll be using a tool named “EcryptFS”.

Downloading & Installing the tool

According to your Linux distro, install the tool first.

  • Ubuntu + Ubuntu-based

If you’re running Ubuntu or Ubuntu-based distro, run this command:

sudo apt install ecryptfs-utils

  • Debian

Run this command:

sudo apt-get install ecryptfs-utils
  • Fedora

For Fedora users, this is the required command line:

sudo dnf install ecryptfs-utils
  • OpenSUSE

sudo zypper install ecryptfs-utils
  • Arch Linux

sudo pacman -S ecryptfs-utils

If your Linux distro or distro-base isn’t listed here, then you have to build it from source. You can also check out the official EcryptFS download page. For any issue with the building, you may need to take help from EcrypFS documentation.

Encrypting the “home” folder

During the encryption process, we have to make a temporary user for performing the encryption tasks. After completing the process, we’ll delete it. This second user is needed as you can’t directly encrypt your “home” folder while logged into the account.

  • Add a user account with the name “encrypt-admin”.

  • Now, it’s time to start encrypting. Run this command:
sudo ecryptfs-migrate-home –u <username>
  • Note that if you want to encrypt multiple accounts, you have to run this process multiple times.

Now, exit the temporary account and login to your main account.

Adding encryption password

After logging in to your original account, run this command:

ecryptfs-add-passphrase

This will give you the option of entering a password for the encrypted “home” folder.

For fully enjoying the feature, restart your Linux system.

Recently, Ubuntu has released their latest edition – v18.04 LTS. Check out every new feature of Ubuntu 18.04 LTS.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

The best lightweight web browsers

Hi! We currently spend a lot of time in front of the computer connected to the Internet. In fact, it is a...

Install Snowflake (SSH Client) on Ubuntu 20.04

Linux system administrators on servers have a big job behind them. Thanks to them, many of the services or tasks that an...

How to install Trisquel 9.0

A few days ago we talked about the release of Trisquel 9.0, this distro is based on the Ubuntu 18.04 LTS packages....

Learn about the Ramnit threat and how to remove it from Windows 10.

Hello! There are computer security threats that can appear spontaneously. But, then they may not last long. On the other hand, malware...

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...
x