如何正确设置sudo / visudo的编辑器?
我正在使用Ubuntu 10.04 Server并尝试设置sudoers以尊重用户的EDITOR选择(在限制内) 在我的sudoers中,我有: Defaults editor=/usr/bin/nano:/usr/bin/vim Defaults env_reset 并在用户.bashrc中: export EDITOR=/usr/bin/vim 设置了$ EDITOR: $ echo $EDITOR /usr/bin/vim 根据man sudoers这个,足以将$ EDITOR设置为vim: editor A colon (':') separated list of editors allowed to be used with visudo. visudo will choose the editor that matches the user's EDITOR environment variable if possible, or the …