Selecting the editor on Debian/Ubuntu non-interactively

Set the selected editor on Ubuntu/Debian for yourself and root in one line:

echo 'SELECTED_EDITOR="/usr/bin/vim.nox"'|tee $HOME/.selected_editor| \
sudo tee /root/.selected_editor

or

echo "SELECTED_EDITOR=\"$(which vim.nox)\""|tee $HOME/.selected_editor| \
sudo tee /root/.selected_editor

// Oliver

This entry was posted in Bash, EN, Linux, Programming and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *