$linuxcli.in _    [commands]    [tips & tricks]    [manpage]    [ESXi CLi]    [what is my ip?]    [pingme!]    [BIOS lock code]    [Code repo]


Change default text editor for current session


In some operating systems vendor ship with nano as a default text editor. while running some commands to edit configuration file it open in default text editor nano but people their own choice of text editor software which they mostly like to use. If you do not have root privileges then the below command would be helpful to change default text editor with your choice of text editor. We will take an example, In Ubuntu machine they ship with nano as a default text editor but in the same machine there is vim text editor installed and I want to use default text editor as vim so I will use below command for that.

export EDITOR=vim

Or if the vim binary is not globally recognize due to its path then the absolute path should be use.

export EDITOR=/usr/share/vim-7.8/bin/vim


Last updated on 30 June 2023 10:43 am IST