I am trying to use the alternatives system on CentOS Linux release 7.3.1611 (Core). I am trying to choose between multiple editors. I am following the tutorial here.


Everything seems to be set up correctly. However, the default editor does not change.Please see the attached png file. enter image description here

  • 2
    Have you tried sudo alternatives --config myeditor? – GMaster May 23 '17 at 1:16
  • you need root permissions to change alternatives... – user34720 May 23 '17 at 17:51

The alternatives command (man page) is a tool to create, remove, maintain and display information about the symbolic links comprising the alternatives system. So, you make system-wide changes with it and, thus, you need a user with elevated privileges. You either have to sudo update-alternatives (if sudo is installed and the user is a sudoer) or login as root with su - and then run said command. This answer to a question about how one runs commands that need root permissions may be helpful to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.