Thursday, 5 June 2008

vi not working with OS X Terminal

I was just doing some troubleshooting on an old Solaris box from my Mac. After sshing in, I tried to use vi to edit a file and the system told me it didn't understand my terminal. By default, OS X sets the terminal to TERM=xterm-color.



To get vi working, simply set the term to an old terminal type like a vt100. That was a pretty standard type back in the day. To do this at the command line type (i'm using the bash shell):

export TERM=vt100



That seems to fix things up. I think the ansi terminal is based on a vt100. Not sure though. If anyone knows, please post a comment.



No comments:

Post a Comment