How To Install uswsusp on Debian 9
Introduction
In this tutorial we learn how to install uswsusp on Debian 9.
What is uswsusp
uswsusp is:
This package (also known as ?swsusp, suspend-utils or simply suspend) contains the programs to use the userspace software suspend facility available in Linux kernels 2.6.17-rc1 and higher. It allows the system to have its state saved to disk and be powered off. On restarting, it will be put back in the state it was left in (this is sometimes called hibernation).
It also includes a program to suspend the system to RAM after the state is saved to disk. In that state, the system still uses power, but resuming is faster. If the battery depletes, the state is resumed from disk without data loss.
Optional features include encrypting the system snapshot.
To use this package you need a Linux kernel version 2.6.17-rc1 or newer configured to use an initramfs. Hooks and scripts to integrate with initramfs-tools are provided.
There are three methods to install uswsusp on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install uswsusp Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install uswsusp using apt-get by running the following command:
sudo apt-get -y install uswsusp
Install uswsusp Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install uswsusp using apt by running the following command:
sudo apt -y install uswsusp
Install uswsusp 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 Debian. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install uswsusp using aptitude by running the following command:
sudo aptitude -y install uswsusp
How To Uninstall uswsusp on Debian 9
To uninstall only the uswsusp package we can use the following command:
sudo apt-get remove uswsusp
Uninstall uswsusp And Its Dependencies
To uninstall uswsusp and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove uswsusp
Remove uswsusp Configurations and Data
To remove uswsusp configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge uswsusp
Remove uswsusp configuration, data, and all of its dependencies
We can use the following command to remove uswsusp configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge uswsusp
Dependencies
uswsusp have the following dependencies:
References
Summary
In this tutorial we learn how to install uswsusp package on Debian 9 using different package management tools: apt, apt-get and aptitude.