ecryptfs-setup-private command not found

In this troubleshooting guide we learn how to fix ecryptfs-setup-private command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ecryptfs-setup-private: command not found

or when using sudo you get the following error message

sudo: ecryptfs-setup-private: command not found

Solutions to ecryptfs-setup-private: command not found

How To Fix ecryptfs-setup-private: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ecryptfs-setup-private is provided by ecryptfs-utils package.

ecryptfs-utils is:

eCryptfs is a POSIX-compliant enterprise-class stacked cryptographic filesystem for Linux.

It provides advanced key management and policy features. eCryptfs stores cryptographic metadata in the header of each file written, so that encrypted files can be copied between hosts; the file will be decryptable with the proper key, and there is no need to keep track of any additional information aside from what is already in the encrypted file itself. Think of eCryptfs as a sort of “gnupgfs”.

eCryptfs is a native Linux filesystem. The kernel module component of eCryptfs is part of the Linux kernel since 2.6.19.

This package contains the userland utilities.

To fix this problem, we can install more using the command below.

sudo apt-get -y install ecryptfs-utils

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install ecryptfs-utils.

sudo apt -y install ecryptfs-utils

Or if you have aptitude installed you can use the following command.

sudo aptitude install ecryptfs-utils

Summary

In this tutorial we learn how to fix ecryptfs-setup-private command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.