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.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
/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
The alternatives system is from Debian, so it's inherited by Debian-derived operating systems like Ubuntu.