I am running UNIX V7 using the SimH emulator. Whenever I press the "backspace" key, instead of the previous character being deleted, what happens is that the cursor is placed on a new line.

Is this how the "backspace" key behaves in UNIX V7, or is it just a SimH thing?

  • What is the output from stty -a?
    – Mick
    Apr 21, 2017 at 19:14
  • @Mick When I do stty -a I get an error: unknown mode: -a.
    – user4938
    Apr 21, 2017 at 19:23
  • Sorry. I cut my teeth on AIX. You don't need any arguments.
    – Mick
    Apr 21, 2017 at 19:25
  • @Mick stty without arguments gives me: speed 0 baud erase = '#'; kill = '@' even -nl echo -tabs cr2.
    – user4938
    Apr 21, 2017 at 19:29
  • Try stty erase <backspace key>.
    – Mick
    Apr 21, 2017 at 19:35

2 Answers 2


By default, the delete character (ASCII 127, ^?) acts as the interrupt key (usually bound to ^C on more modern Unix-like systems). Pressing the interrupt key will behave as you describe. In Unix v7 there's no easy way to change this except to modify the kernel.

If your terminal sends a delete character when you press the backspace key, try modifying your terminal settings so that it sends backspace (ASCII 8, ^H) instead. Then use the following command to get Unix to recognize backspace as the erase character:

stty erase '^H'

While you're at it, you might want to also set the line-kill key according to modern usage:

stty kill '^U'

Please try the following:

  1. Find out what your backspace key is generating, by running od -b then pressing backspace, then ctrl-D. If ctrl-D doesn't work, press up to 16 arbitrary different characters, then press Enter to see the output, then press ctrl-C.

  2. Say stty erase ^H if backspace generates byte 010, or stty erase ^_ if backspace generates byte 0177.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.