How do I replace
vim so that when I type
vi in terminal
vim is opened?
'vi' in Ubuntu already starts 'vim', although by default it starts 'vim-tiny' (which comes closest to the original 'vi' in its (lack of) features). You can see this with:
sudo update-alternatives --display vi
If you want it to use another version of vim, then make sure it's installed and run:
sudo update-alternatives --config vi
In addition to what Peter Smit has suggested. You can do the following as well to make that change system wide rather than just your account.
alias vi='vim' to /etc/bash.bashrc
or create a symlink to vim
sudo ln -s /usr/bin/vim /usr/bin/vi
However on my system both /usr/bin/vim and /usr/bin/vi are symlinks to /etc/alternatives/vim