Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-09-2004, 12:29 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 28

Rep: Reputation: 15
STTY and backspace key


From my local fedora machine at home I SSH to my remote linux account at work.

The backspace key is not working. When I press the backspace key, the character is not erased, instead I get a new line. Ctrl-H works fine and it erases the characters typed.

I would like to change that so that my backspace key works and I do not have to use the Ctrl-H combination.

I am trying to undestand the man pages for stty but I cannot figure out how to use stty to solve my problem.

I type stty -a and I see that erase = ^? . That is very weird, when I type Ctrl-H, it erases characters, therefore stty -a should show that erase = ^H instead ?

Just to experiment I change the erase key to something else.

stty erase ^I

stty -a now shows that erase = ^I

But Ctrl-I does not do anything and Ctrl-H still erases characters. I am totally lost here can someone please explain to me how that stty command works. I thought that whatever key combinations stty shows for erase should actually erase the characters. It would be great if someone can tell me how to use stty to set my backspace key to work.

Old 07-09-2004, 10:40 AM   #2
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
stty erase <backspace><enter>

i.e. press the backspace key.

Old 07-09-2004, 02:46 PM   #3
LQ Newbie
Registered: Jul 2003
Posts: 28

Original Poster
Rep: Reputation: 15
Hello RO

No that does not work

stty erase <backspace><enter>

When I press the backspace key I get a new line



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fix backspace key? Jim Blackwood Linux - Laptop and Netbook 1 02-26-2005 09:29 PM
STTY and backspace keyy ministre Linux - General 1 07-09-2004 05:30 PM
Backspace key mapping in vi arobic Linux - General 2 06-30-2004 02:30 PM
Getting a ^H on backspace key mlawler Linux - Software 1 04-28-2004 06:56 PM
Backspace key problem fr0zen Linux - General 0 12-23-2003 03:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration