Make Vi Work on IBM i

Have you SSHed into your IBM i and tried to edit a file with vi only to be greeted with this?

The default TERM for IBM i is currently set to xterm-256color. You can test this by typing echo $TERM:


To fix this, simply define your terminal to the proper value, usually just xterm.

export TERM=xterm

You can set it in your dotfiles (.bashrc for example), like I do in my dotfiles.

Vi should work just fine now!

Leave Comment

Your email address will not be published. Required fields are marked *