update-alternatives:tldr:00eff
The command "update-alternatives --get-selections" is used in Linux systems to display the current status and selection of installed alternatives.
In Linux, alternatives allow for multiple versions or implementations of a program or command to coexist on a system. For example, there can be multiple versions of a text editor or web browser installed, and the system needs a way to determine which version should be the default.
The "update-alternatives" command is used to manage these alternatives. When executed with the "--get-selections" option, it lists the currently active alternatives and the status of each.
The output of the command will typically consist of multiple lines, with each line containing the name of an alternative followed by its current selection and priority.
For example:
editor auto /usr/bin/vim.basic
pager auto /bin/more
In this example, the "editor" alternative is currently set to automatically select "/usr/bin/vim.basic" with a priority factor, and the "pager" alternative is set to automatically select "/bin/more" without any priority specified.
The priorities are used to determine the default selection when there are multiple alternatives available. A higher priority value indicates a higher precedence.
Overall, the "update-alternatives --get-selections" command provides an overview of the active alternatives on a Linux system and their current configurations.