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!

πŸ’πŸ¦—πŸ™πŸ’»πŸŽ±πŸš² | They/Them | Coding since age 9 πŸ‘Άβž‘οΈπŸ‘¨β€πŸ’» | #Autistic w/ #CharcotMarieTooth | #IBMi + #Linux; #OpenSource #Monk; #BridgingGaps; #IBMChampion | Passionate advocate of open source and its mindset. Business owner and public speaker. Lover of animals, cooking, horror-films, hip-hop, pool, and the Oxford comma; for lists.

Leave Comment

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