Help! Backspace Doesn't Work in the Linux Terminal (2024)

The Backspace key isn't something you normally think about too much, but sometimes you might find it doesn't work correctly in the terminal, especially when logged in to a remote machine, echoing "^H" instead of erasing what you've typed.

Fortunately, this is easy to fix with a simple command.

What Are These Weird Characters?

You may notice this problem when you log in to remote machines over SSH, ones that run non-Linux Unix operating systems, particularly proprietary systems like Oracle's Solaris. A lot of older computer terminals used a different control character for Backspace than today, using "Ctrl + H."

Modern terminals use "Ctrl + ?" for Backspace. Most systems will recognize the latter as Backspace these days as physical terminals have largely been replaced by terminal emulators on PCs, but you may still run into systems that haven't been upgraded and still expect "Ctrl + H."

This is one reason you'll see old Unix hands jokingly use "^H" in messages in the same way people use ironic strikethroughs to indicate "Oops, you weren't supposed to see that!" They might say something like "I love Linux system mangling^H^H^H^H^H^H^Hadministration."

Checking Terminal Settings with stty

You can check what control characters the system uses with the stty command. The -a flag will give a human-readable output of the control characters.

stty -a 

Look for the "erase" character. If it says "^H," then it uses the older Backspace character. Fortunately, you can also fix this with the stty command.

Setting the Erase Character

Help! Backspace Doesn't Work in the Linux Terminal (2)

You can set the erase character to the one your computer uses with this simple command:

stty erase '^?' 

Try this and see if the Backspace key works correctly. You can put this in the shell's startup file, such as .bashrc for Bash and .zshrc for Zsh to have this set automatically when you log into the system.

Related: What Does Bash Mean in Linux?

Similar to the Backspace key, you can fix the issue using the stty command if Tab doesn't work in the terminal.

Now Your Backspace Key Works in the Linux Terminal

Now that you've sorted out the Backspace key issue in the Linux terminal, you can really get to work.

If you're using the terminal to log in to remote systems, you can be even more productive with the combination of tmux and Mosh, letting you create sessions that can keep you connected forever.

Help! Backspace Doesn't Work in the Linux Terminal (2024)
Top Articles
Fiduciary Financial Advisor | 40+ Years of Trusted Partnership
Where to Sell Gold (and How to Get the Most for It!)
417-990-0201
Nwi Police Blotter
How Much Is 10000 Nickels
Mustangps.instructure
Umn Pay Calendar
Fallout 4 Pipboy Upgrades
Grand Park Baseball Tournaments
Cincinnati Bearcats roll to 66-13 win over Eastern Kentucky in season-opener
Methodist Laborworkx
The Superhuman Guide to Twitter Advanced Search: 23 Hidden Ways to Use Advanced Search for Marketing and Sales
Steamy Afternoon With Handsome Fernando
Daily Voice Tarrytown
Rachel Griffin Bikini
111 Cubic Inch To Cc
ARK: Survival Evolved Valguero Map Guide: Resource Locations, Bosses, & Dinos
Average Salary in Philippines in 2024 - Timeular
Craigslist Mt Pleasant Sc
Bing Chilling Words Romanized
Beryl forecast to become an 'extremely dangerous' Category 4 hurricane
Robeson County Mugshots 2022
Cvs El Salido
Euro Style Scrub Caps
Xfinity Outage Map Fredericksburg Va
Aspenx2 Newburyport
Firefly Festival Logan Iowa
Dexter Gomovies
Obituaries, 2001 | El Paso County, TXGenWeb
Our 10 Best Selfcleaningcatlitterbox in the US - September 2024
Experity Installer
Craigslist Scottsdale Arizona Cars
Sam's Club Near Wisconsin Dells
Lil Durk's Brother DThang Killed in Harvey, Illinois, ME Confirms
Orangetheory Northville Michigan
Oxford Alabama Craigslist
Lyca Shop Near Me
The Banshees Of Inisherin Showtimes Near Reading Cinemas Town Square
Craigslist Pets Plattsburgh Ny
Best Restaurants Minocqua
The Listings Project New York
Below Five Store Near Me
Tricia Vacanti Obituary
Exploring the Digital Marketplace: A Guide to Craigslist Miami
Advance Auto.parts Near Me
Elven Steel Ore Sun Haven
Phone Store On 91St Brown Deer
Where To Find Mega Ring In Pokemon Radical Red
Texas Lottery Daily 4 Winning Numbers
Varsity Competition Results 2022
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 6213

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.