-
Notifications
You must be signed in to change notification settings - Fork 1
[Snippet] Setup sudoedit
Éric Massé edited this page Mar 15, 2015
·
1 revision
###References:
When you exit, sudoedit
overwrites the original. (sudoedit
does not update the real file every time you write changes to the temp file. It waits until you exit your editor.)
sudoedit
lets the admin tighten sudoers with a “least privilege” model, while still letting the user choose which editor to use.
sudoedit
preserves all your editor customizations, sudo $EDITOR
doesn’t.
export EDITOR=/usr/bin/vim
export EDITOR=/usr/bin/emacs
export EDITOR=/bin/nano
~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
EDITOR=/bin/nano