Method 1
1 | vi /etc/bashrc |
Find
1 2 | export EDITOR=”pico” export VISUAL=”pico” |
Replace with
1 2 | export EDITOR=”vi” export VISUAL=”vi” |
Method 2 edit .bash_profile
1 | vi /root/.bash_profile |
Add
1 | export VISUAL=vi |
Once added, .bash_profile will look like
[email protected] [~]# cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export VISUAL=vi export PATH unset USERNAME uptime [email protected] [~]# |
Method 3 If you need it done one time only, run following commands on command prompt.
1 | VISUAL=vi; export VISUAL |