LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ecryptfs-setup-swap

encrypted swap configuration

TLDR

Setup encrypted swap
$ ecryptfs-setup-swap
copy
Setup with specific swap partition
$ ecryptfs-setup-swap [/dev/sda2]
copy

SYNOPSIS

ecryptfs-setup-swap [-f|--force] [device]

DESCRIPTION

ecryptfs-setup-swap configures encrypted swap space using dm-crypt with a random key. This prevents sensitive data from being recoverable from swap after shutdown.The script modifies /etc/fstab and /etc/crypttab to enable encrypted swap on boot. A random key is generated each boot, so swap contents are unrecoverable after restart.Encrypted swap is important when using encrypted home directories, as unencrypted swap could leak decrypted data.

PARAMETERS

DEVICE

Swap partition to encrypt. If omitted, every active swap device is used.
-f, --force
Set up encrypted swap even if the device already looks encrypted.

INSTALL

sudo apt install ecryptfs-utils
copy
sudo dnf install ecryptfs-utils
copy
sudo pacman -S ecryptfs-utils
copy
sudo apk add ecryptfs-utils
copy
sudo zypper install ecryptfs-utils
copy

CAVEATS

Disables hibernation (swap content unrecoverable). Requires root privileges. Existing swap will be reformatted. Must run with system not using swap.

HISTORY

ecryptfs-setup-swap is part of the eCryptfs utilities, addressing the security gap where encrypted filesystem data could leak to unencrypted swap space.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid