update-alternatives - maintain symbolic links determining default commands


To check for the version update-alternatives 
$ update-alternatives --version

To choosing the Alternative in Manual Mode With config for editors
$ sudo update-alternatives --config editor

To choose the alternative with set
$ sudo update-alternatives --list editor
/bin/ed
/bin/nano
/usr/bin/vim.basic
/usr/bin/vim.tiny

To choose and set manually vim.basic editor
$ sudo update-alternatives --set editor /usr/bin/vim.basic

To set back to auto mode 
$ sudo update-alternatives --auto editor

 Adding New Alternative With install
$ sudo apt install emacs

To make emacs editor available in editor options and set 100 as priority
$ sudo update-alternatives --install /usr/bin/editor editor /usr/bin/emacs 100
$ /usr/bin/editor 
will make open emacs as default editor

To list alternatives with get-selections
$ sudo update-alternatives --get-selections



regards,
T.Dhanasekar