needrestart
Needrestart is a command-line tool designed for Linux systems to automatically detect and restart services that need to be restarted after an upgrade or a library update. It helps ensure that system services and processes are running smoothly and with the latest versions of libraries and binaries.
When executed, needrestart scans the system and checks whether any running processes have open file descriptors to outdated libraries or binaries. If it finds any affected processes, it generates a list and can even automatically restart them.
This tool supports various init systems like Systemd, Upstart, and SysV Init. It can also handle both dynamically and statically linked binaries, ensuring that all processes are properly restarted.
Additionally, needrestart checks for kernel updates and recommends a reboot if necessary. It provides options to exclude certain processes or specific package managers from the scan.
Needrestart is highly customizable, allowing users to configure its behavior through various command-line options and configuration files.
Overall, this tool simplifies the process of identifying and restarting services that require updates, ensuring the system remains secure and up-to-date.
List of commands for needrestart:
-
needrestart:tldr:14831 needrestart: List outdated processed using a specific [c]onfiguration file.$ needrestart -c ${path-to-config}try on your machineexplain this command
-
needrestart:tldr:7c7a6 needrestart: Check if the CPU microcode is outdated.$ needrestart -wtry on your machineexplain this command
-
needrestart:tldr:7ca54 needrestart: List outdated processes in [b]atch mode.$ needrestart -btry on your machineexplain this command
-
needrestart:tldr:bdcd0 needrestart: List outdated processes.$ needrestarttry on your machineexplain this command
-
needrestart:tldr:d4b03 needrestart: List outdated processes in [v]erbose or [q]uiet mode.$ needrestart -${select}try on your machineexplain this command
-
needrestart:tldr:f4968 needrestart: Check if the [k]ernel is outdated.$ needrestart -ktry on your machineexplain this command
-
needrestart:tldr:fa263 needrestart: Display help.$ needrestart --helptry on your machineexplain this command