Cygwin Terminal backspace and arrow keys not working

Cygwin is a popular Unix-like command-line environment for Microsoft Windows. It provides many of the standard Unix tools, including bash, grep, sed, and awk. Unfortunately, some users have encountered an issue with the Cygwin terminal: their backspace and arrow keys do not work as expected.

The root of the problem is that the terminal driver in Cygwin is not configured correctly. This can be resolved by modifying the terminal settings. Here’s how to do it:

1. Open the Cygwin terminal.
2. Type “stty -a” and press enter.
3. Look for the following line: “intr = ^C; quit = ^\\; erase = ^?; kill = ^U; eof = ^D; eol = ^M; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;”
4. Change the line to: “intr = ^C; quit = ^\\; erase = ^H; kill = ^U; eof = ^D; eol = ^M; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;”
5. Type “stty sane” and press enter.

At this point, your backspace and arrow keys should be working as expected. If they are not, try repeating the steps above. If the issue persists, you may need to edit the /etc/inputrc file.

To edit the /etc/inputrc file, open it with a text editor and look for the following line: “# arrow keys and other special keys.” Below this line, add the following:

“# Enable arrow keys
\\\e[A\: previous-history
\\\e[B\: next-history
\\\e[C\: forward-char
\\\e[D\: backward-char
# Enable Ctrl+left/right to move word
\\\e[1;5C\: forward-word
\\\e[1;5D\: backward-word
# Enable home/end
\\\e[1~\: beginning-of-line
\\\e[4~\: end-of-line”

Save the file and restart the Cygwin terminal. Your arrow keys and backspace should now be working correctly.

If the issue persists, you may need to adjust the terminal settings in the registry. To do this, open the registry editor (regedit.exe) and navigate to the following key:


Once there, look for the “TerminalType” value and change it to “xterm-256color” (without the quotes). Save the changes, close the registry editor, and restart the Cygwin terminal.

These steps should resolve the issue with the Cygwin terminal’s backspace and arrow keys. If you’re still having problems, you may need to install the latest version of Cygwin or consult the Cygwin documentation.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo