Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently purchased a VT220 and all the hardware necessary to hook it to my macbook pro. After several hours of fiddling I got it working with a shell - my only problem is my shell of choice, ZSH, behaves weirdly. Backspace and Arrow keys, as well as Ctrl-a and Ctrl-e do not actually move the cursor and while they do delete it is kind of awkward.

Using BASH on the other hand, the device works flawlessly. Is there an issue with some control character or something that ZSH is using?

share|improve this question
Did you try export TERM=vt220? – Mischa Arefiev Feb 28 '12 at 9:04
I had not - that FIXED IT!!! Thank you very much. Is there a way I can have it do this automatically on this specific console but not my other consoles? I'd throw it in my zshrc but that would do every console... – donatJ Mar 1 '12 at 0:04
The default value of TERM is normally specified by the getty process accepting the serial connection. If this were Linux, you might run getty like /sbin/getty 115200 ttyS0 vt220. This will set TERM to vt220 when accepting any login over ttyS0. I'm not sure of the MacOS equivalent. – penguin359 Mar 2 '12 at 22:24
Third column in /etc/ttys on OS X. – Ingmar Hupp Mar 3 '12 at 3:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.