What does /etc/alternatives stand for? How and why is it used?
I found gnome-tex-editor in /usr/bin which is linked as follows:
/usr/bin/gnome-text-editor -> /etc/alternatives/gnome-text-editor
/etc/alternatives/gnome-text-editor -> /usr/bin/gedit
So gedit and gnome-text-editor seem to be the same thing.
So why are some commands (e.g.: gedit and gnome-text-editor) provided twice?
And what is the use of /etc/alternatives/ - how does it work?
nvimwas hijackingvim(I probably did it a long time ago) and now wanted to usevim. I first ranupdate-alternatives --query vim, which is very helpful it showed that it would link tovim.basic, but thatnvimwas the default. Then I ranupdate-alternatives --remove vim /usr/bin/nvim, this now meant that vim would link to/usr/bin/vim.basicwhich is what I wanted. – icc97 Oct 16 '20 at 12:12