The beauty of visudo is that visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors. Look at man page for more information.
However, visudo uses nano as a default editor. How do I change the editor as I'm very used to vi or vim to do my editing. Here is a simple way of doing.
Put the following inside your .bashrc file
# vim .bashrc
------------------------------------------- export EDITOR=vim sudo visudo --------------------------------------------
# source .bashrc
You should be able to use vim as the default editor for visudo
No comments:
Post a Comment