Fixing the Backspace key in the UNIX shell

Allot of times when at the command prompt in UNIX, the backspace key doesn’t do what the backspace key should and instead simply put ^H’s on the screen.

Backspace
photo by thegareth

There are three ways to fix this:

  1. Use the delete key instead. Sometimes the delete is mapped to erase the first character to the left.
  2. Use CTRL+H to backspace. Sometimes simply using ctrl+h will erase the first character to the left.
  3. Use stty to map ^H to be erase, like this,
    # stty erase ^H

You can also fix it put configuring the terminal program you are using. Look for any options mentioning backspace or CTRL+H and turn them on.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s