How To Install powernap on Ubuntu 18.04
Introduction
In this tutorial we learn how to install powernap
on Ubuntu 18.04.
What is powernap
powernap is:
PowerNap watches a series of configurable monitors. When no activity has occurred on any of these monitors for some specified time, PowerNap deems the system inactive, and takes action, as configured by the system administrator.
PowerNap can monitor:
- User Activity (Console, Keyboard, Mouse)
- System Activity (Load, Processes, Process IO)
- Network Activity (wake-on-lan, UDP ports, TCP ports)
Some of these are event-based, while others are poll-based. PowerNap’s polling interval, INTERVAL_SECONDS, is configurable.
The required length of inactivity, ABSENT_SECONDS, is configurable.
The action taken by PowerNap when the system is active, is configurable, and might be one of pm-powersave, pm-suspend, pm-hibernate, poweroff, or any executable script as chosen by the system administrator.
See /etc/powernap/config for all configurable options and defaults.
There are three methods to install powernap
on Ubuntu 18.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 powernap Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install powernap
using apt-get
by running the following command:
sudo apt-get -y install powernap
Install powernap Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install powernap
using apt
by running the following command:
sudo apt -y install powernap
Install powernap 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 powernap
using aptitude
by running the following command:
sudo aptitude -y install powernap
How To Uninstall powernap on Ubuntu 18.04
To uninstall only the powernap
package we can use the following command:
sudo apt-get remove powernap
Uninstall powernap And Its Dependencies
To uninstall powernap
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove powernap
Remove powernap Configurations and Data
To remove powernap
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge powernap
Remove powernap configuration, data, and all of its dependencies
We can use the following command to remove powernap
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge powernap
References
Summary
In this tutorial we learn how to install powernap
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.