Backspace and arrows not working in ubuntu vi

Add 2 lines:

vi .vimrc

set nocompatible
set backspace=2