How To Install shutdown-at-night on Kali Linux
Introduction
In this tutorial we learn how to install shutdown-at-night on Kali Linux.
What is shutdown-at-night
shutdown-at-night is:
With this tool you can schedule regular shutdowns of workstations in the evening, and also wake them up every morning, using either nvram-wakeup, ACPI wakeup or wake-on-lan.
For the wake-on-lan wake-up sequence you need one awake machine on your local network / subnet. This can be a server machine or a client machine that got just previously woken up by nvram-wakeup.
The shutdown sequence will be initiated hourly after 4pm via a CRON job. However, only machines that appear inactive / unused will be shut down. Machines that are currently in use will remain up and running.
The Shutdown-at-Night tool can be activated via a config file or via membership in a NIS netgroup called shutdown-at-night-hosts.
There are three methods to install shutdown-at-night on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install shutdown-at-night Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install shutdown-at-night using apt-get by running the following command:
sudo apt-get -y install shutdown-at-nightInstall shutdown-at-night Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install shutdown-at-night using apt by running the following command:
sudo apt -y install shutdown-at-nightInstall shutdown-at-night Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.
sudo aptitude updateAfter updating apt database, We can install shutdown-at-night using aptitude by running the following command:
sudo aptitude -y install shutdown-at-nightHow To Uninstall shutdown-at-night on Kali Linux
To uninstall only the shutdown-at-night package we can use the following command:
sudo apt-get remove shutdown-at-nightUninstall shutdown-at-night And Its Dependencies
To uninstall shutdown-at-night and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove shutdown-at-nightRemove shutdown-at-night Configurations and Data
To remove shutdown-at-night configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge shutdown-at-nightRemove shutdown-at-night configuration, data, and all of its dependencies
We can use the following command to remove shutdown-at-night configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge shutdown-at-nightDependencies
shutdown-at-night have the following dependencies:
References
Summary
In this tutorial we learn how to install shutdown-at-night package on Kali Linux using different package management tools: apt, apt-get and aptitude.