How To Install cryptsetup on Ubuntu 20.04
Introduction
In this tutorial we learn how to install cryptsetup
on Ubuntu 20.04.
What is cryptsetup
cryptsetup is:
Cryptsetup provides an interface for configuring encryption on block devices (such as /home or swap partitions), using the Linux kernel device mapper target dm-crypt. It features integrated Linux Unified Key Setup (LUKS) support.
Cryptsetup is backwards compatible with the on-disk format of cryptoloop, but also supports more secure formats. This package includes support for automatically configuring encrypted devices at boot time via the config file /etc/crypttab. Additional features are cryptoroot support through initramfs-tools and several supported ways to read a passphrase or key.
This package provides the cryptdisk_start and stop wrappers and luksformat. Task: server, cloud-image, ubuntu-live, kubuntu-desktop, kubuntu-full, xubuntu-live, lubuntu-live, ubuntustudio-dvd-live, ubuntukylin-live, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-live
Package: cryptsetup Architecture: amd64 Version: 2:2.2.2-3ubuntu2.2 Multi-Arch: foreign Priority: optional Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Cryptsetup Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 397 Depends: cryptsetup-bin (>= 2:1.6.0), dmsetup, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.15) Recommends: cryptsetup-initramfs, cryptsetup-run Suggests: dosfstools, keyutils, liblocale-gettext-perl Breaks: cryptsetup-run (« 2:2.1.0-6) Replaces: cryptsetup-run (« 2:2.1.0-6) Filename: pool/main/c/cryptsetup/cryptsetup_2.2.2-3ubuntu2.2_amd64.deb Size: 158944 MD5sum: 92fe243ee7901efb3463aad14232e296 SHA1: 958b36fc068627141e1eda9ccdecb1812617d29d SHA256: 33604f2f70522e7cef152aa6fcddcac06086c5fa7a7792658bfb1f1205855a79 SHA512: e00ed5193a280e969cf972146631b8858b7e3f51079c7df45abb92b4ad9b71f598f8a3f89d3bc112111f40f4e0a7991a0e49d1910b4c7c0037ba9ff01cdfa33c Homepage: https://gitlab.com/cryptsetup/cryptsetup Description-en: disk encryption support - startup scripts Cryptsetup provides an interface for configuring encryption on block devices (such as /home or swap partitions), using the Linux kernel device mapper target dm-crypt. It features integrated Linux Unified Key Setup (LUKS) support.
Cryptsetup is backwards compatible with the on-disk format of cryptoloop, but also supports more secure formats. This package includes support for automatically configuring encrypted devices at boot time via the config file /etc/crypttab. Additional features are cryptoroot support through initramfs-tools and several supported ways to read a passphrase or key.
This package provides the cryptdisk_start and stop wrappers and luksformat. Task: server, cloud-image, ubuntu-live, kubuntu-desktop, kubuntu-full, xubuntu-live, lubuntu-live, ubuntustudio-dvd-live, ubuntukylin-live, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-live
Package: cryptsetup Architecture: amd64 Version: 2:2.2.2-3ubuntu2 Multi-Arch: foreign Priority: optional Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Cryptsetup Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 397 Depends: cryptsetup-bin (>= 2:1.6.0), dmsetup, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.15) Recommends: cryptsetup-initramfs, cryptsetup-run Suggests: dosfstools, keyutils, liblocale-gettext-perl Breaks: cryptsetup-run (« 2:2.1.0-6) Replaces: cryptsetup-run (« 2:2.1.0-6) Filename: pool/main/c/cryptsetup/cryptsetup_2.2.2-3ubuntu2_amd64.deb Size: 158920 MD5sum: 3c6f7d62857ba0e25443114b25a0d9cb SHA1: d2d4a444a286ee3c421a7dc5e9dd212104c5b1db SHA256: bf4e6a5558b4fe30b85772c11fa5e9a5c0547a1e0b725b3b116beb24a6ab594f Homepage: https://gitlab.com/cryptsetup/cryptsetup Description-en: disk encryption support - startup scripts Cryptsetup provides an interface for configuring encryption on block devices (such as /home or swap partitions), using the Linux kernel device mapper target dm-crypt. It features integrated Linux Unified Key Setup (LUKS) support.
Cryptsetup is backwards compatible with the on-disk format of cryptoloop, but also supports more secure formats. This package includes support for automatically configuring encrypted devices at boot time via the config file /etc/crypttab. Additional features are cryptoroot support through initramfs-tools and several supported ways to read a passphrase or key.
This package provides the cryptdisk_start and stop wrappers and luksformat. Task: server, cloud-image, ubuntu-live, kubuntu-desktop, kubuntu-full, xubuntu-live, lubuntu-live, ubuntustudio-dvd-live, ubuntukylin-live, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-live
There are three methods to install cryptsetup
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install cryptsetup Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install cryptsetup
using apt-get
by running the following command:
sudo apt-get -y install cryptsetup
Install cryptsetup Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install cryptsetup
using apt
by running the following command:
sudo apt -y install cryptsetup
Install cryptsetup Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install cryptsetup
using aptitude
by running the following command:
sudo aptitude -y install cryptsetup
How To Uninstall cryptsetup on Ubuntu 20.04
To uninstall only the cryptsetup
package we can use the following command:
sudo apt-get remove cryptsetup
Uninstall cryptsetup And Its Dependencies
To uninstall cryptsetup
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove cryptsetup
Remove cryptsetup Configurations and Data
To remove cryptsetup
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge cryptsetup
Remove cryptsetup configuration, data, and all of its dependencies
We can use the following command to remove cryptsetup
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge cryptsetup
References
Summary
In this tutorial we learn how to install cryptsetup
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.