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
Company Overview
SEC Ends Probe Into Consensys, Won't Sue Over Ethereum
Is Sam's Club Plus worth it? What to know about the premium warehouse membership before you sign up
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
Craigslist Niles Ohio
Wizard Build Season 28
Readyset Ochsner.org
Apex Rank Leaderboard
Elden Ring Dex/Int Build
Atrium Shift Select
Skip The Games Norfolk Virginia
Oppenheimer & Co. Inc. Buys Shares of 798,472 AST SpaceMobile, Inc. (NASDAQ:ASTS)
Elizabethtown Mesothelioma Legal Question
Missing 2023 Showtimes Near Landmark Cinemas Peoria
Sony E 18-200mm F3.5-6.3 OSS LE Review
Gino Jennings Live Stream Today
Munich residents spend the most online for food
Tamilrockers Movies 2023 Download
Katherine Croan Ewald
Diamond Piers Menards
The Ultimate Style Guide To Casual Dress Code For Women
Site : Storagealamogordo.com Easy Call
Is Windbound Multiplayer
Filthy Rich Boys (Rich Boys Of Burberry Prep #1) - C.M. Stunich [PDF] | Online Book Share
Integer Division Matlab
Sandals Travel Agent Login
Horn Rank
Ltg Speech Copy Paste
Random Bibleizer
Craigslist Fort Smith Ar Personals
The Clapping Song Lyrics by Belle Stars
Poe T4 Aisling
R/Sandiego
Kempsville Recreation Center Pool Schedule
Rogold Extension
Beaver Saddle Ark
Log in or sign up to view
A Man Called Otto Showtimes Near Amc Muncie 12
Powerspec G512
Saybyebugs At Walmart
2007 Jaguar XK Low Miles for sale - Palm Desert, CA - craigslist
Miami Vice turns 40: A look back at the iconic series
Love Words Starting with P (With Definition)
Tlc Africa Deaths 2021
Youravon Com Mi Cuenta
Nope 123Movies Full
Kushfly Promo Code
Diario Las Americas Rentas Hialeah
Game Akin To Bingo Nyt
Marion City Wide Garage Sale 2023
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.