Changing the default editor on the system

Tired of the vi editor? See how simple it is to change the default editor on Linux/Unix! Learn to set your favorite editor permanently or temporarily.

In most cases the default editor on Linux/Unix systems is vi. Various applications often use vi as their base option editor because it's set as the default in our system. However, not everyone finds this suitable - fortunately we can quickly and easily change it by issuing the command
export EDITOR=our_favorite_editor. However, this will only remain in effect for the current session; for the change to be permanent, we need to put this command into the .profile or .bash_profile file.