Bug #301


Backspace key prints ^H to console instead of deleting a character

Added by andrew k7 almost 13 years ago. Updated almost 13 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


Pressing the backspace key on a standard keyboard on Solaris (and therefore Illumos) does not produce the expected behaviour - i.e. the deletion of the character immediately to the left of the current cursor position. Instead the text '^H' is echoed to the screen. Once logged in this can be fixed by issuing the command 'stty erase ^H' but this still leaves two problems: 1) the delete key will then do nothing and 2) this does not help fix the problem of backspace producing a ^H before you log in.

The problem does not usually happen when you are running inside X windows - it is most evident when running with a text console.

When I raised this issue a few years ago on I was helpfully informed that this was not a bug, since the system was doing what it was designed to do. I maintain that it IS a bug since the system is not doing what users coming from other systems like Linux expect it to do.

Actions #1

Updated by Gary Mills almost 13 years ago

This tty setting seems to be the Solaris default:

intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;

The settings for interrupt and backspace actions are a personal
preference. As far as I know, there is no standard and certainly
no consensus. About the best we can do is to make it easy for
each user to set them according to their preference. We do this
in .profile using `tset' to set the terminal type at the same time.
Mine wind up like this:

intr = ^?; quit = ^\; erase = ^h; kill = ^u;

I know that most people expect the interrupt character to be
^C, but I like it to be [Del].

Actions #2

Updated by andrew k7 almost 13 years ago

Gary Mills wrote:

The settings for interrupt and backspace actions are a personal
preference. As far as I know, there is no standard and certainly
no consensus.

True, but which other OS has the backspace key not acting as a backspace key by default? My point is that the behaviour is unexpected to users coming from other systems, and for someone like me who has been using OpenSolaris for a few years I still find it a pain in the backside.

Actions #3

Updated by Jason King almost 13 years ago

I think this is more of a distribution issue.

Any distro can ship a modified /kernel/drv/options.conf that defines a different default value for ttymodes (which could do things such as define erase as control-h) -- this has the nice effect of being independent of any particular shell (unless of course they override the value).

Actions #4

Updated by andrew k7 almost 13 years ago

The fix is to change the following line in /kernel/drv/options.conf:


so that it reads:


i.e. replace 7f with 8. This makes backspace be the erase key and makes the delete key echo ^? to the screen instead.

A quick google reveals this little piece of information at

stty erase ^?     Set backspace key for vt100 terminals
stty erase ^H     Set backspace key for wyse50 terminals

So it seems that there is more to this behaviour than I first thought. Since this is dependent on the type of terminal you are using to access the system on I think this is not something Illumos should change since it will actually make things worse for some users (i.e. those using vt100 and presumably some other term types).

Feel free to close this as "not a bug".

Actions #5

Updated by Garrett D'Amore almost 13 years ago

  • Status changed from New to Closed

As indicated already, this isn't a bug. In fact, the choice of how this is to be mapped is a combination of both the terminal emulator and the stty setting.

I'm closing this now.


Also available in: Atom PDF