Issues editing files with nano in Bash/Windows 10
I'm having display issues whenever I edit files with nano in Windows 10 Linux Subsystem.
I will connect to a remote system (local CentOS7 VM on Virtualbox) using Bash/SSH. Then, I'll proceed to edit files on said remote system using nano.
I'll open a file, start deleting text and suddenly, entire lines of text start disappearing. I have to close and restart my work. When I get tired of it, I'll just switch to vim. I'd rather be in nano which works well for the basic stuff I do.
Anyone else seeing this?
Edit #1
- Simply navigating the document in nano can cause this issue
- vim and Putty aren't behaving in the same manner
- Ctrl+Shift + 6 does not fix the issue
- Using essentially a vanilla install of CentOS7, no modifications to the shell
- AFAIK, this issues doesn't seem to happen when I access my Ubuntu Server VPS
This is caused by incompatible remote terminfo. You could try this fix:
TARobison commented on Feb 22, 2017 •
@ShimShamSam I had the exact same problem and it was killing me.
I work on a few different servers and only the CentOS one was behaving
like this. Using the following when I log in has so far fixed the problem
for me.
stty sane
export TERM=linux
I'm new to all of this, so maybe we aren't talking about the same thing
here, but I thought I'd offer what little I could.`
More info here: https://github.com/Microsoft/WSL/issues/1436
This is a similar problem. You could check this out if you are not able to fix the issue: https://serverfault.com/questions/329154/ssh-garbling-characters-in-vim-nano-on-remote-server