In my Ubuntu 18 I could see a file /var/backups/alternatives.tar.0. When I opened, I could see paths of many application files. What is the actual purpose of this file?
A simple Google search doesn't seem to show any worthy resuls.
/var/backups/alternatives.tar.* is a backup of the /etc/alternatives directory. So what is /etc/alternatives?
It's a directory for keeping track of which program on your system is the 'default' among its peers. For example, imagine you ask your system to open a text file without specifying a text editor. Should it open vi, Emacs, gedit? /etc/alternatives maintains a symlink to the program that is the 'canonical' text editor. Ditto for web browsers, torrent trackers, etc.
Normally you don't interact with /etc/alternatives directly, rather you use the update-alternatives commands.
The alternatives system is from Debian, so it's inherited by Debian-derived operating systems like Ubuntu.
/var/backups/alternatives.tar.* is a backup of the /etc/alternatives directory. So what is /etc/alternatives?
It's a directory for keeping track of which program on your system is the 'default' among its peers. For example, imagine you ask your system to open a text file without specifying a text editor. Should it open vi, Emacs, gedit? /etc/alternatives maintains a symlink to the program that is the 'canonical' text editor. Ditto for web browsers, torrent trackers, etc.
Normally you don't interact with /etc/alternatives directly, rather you use the
update-alternatives
commands.The alternatives system is from Debian, so it's inherited by Debian-derived operating systems like Ubuntu.