Text editors not functional

Slater Victoroff asked:

Running into a slightly strange situation. Basically for reasons outside of my control I’m on a server that somebody else has set up. I’ve got sudo access, I just can’t figure out what happened or find any documentation.

When I open .bashrc (sudo nano ~/.bashrc) I get a static view that just overwrites the top row. I can exit only by hitting enter after hitting Ctrl+X. Screenshot below.

enter image description here

Same thing happens with vi, and obviously this makes it impossible to edit anything on the server. Anyone have an idea as to what might be happening here? I’ve done a lot of googling, but it’s tough to lock this down.

Response of lsb_release -a pasted below.

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:   bionic

My answer:


It sounds like someone has messed with the (virtual) tty settings that are best left alone in the 21st century, unless of course you’re actually using an antique physical terminal from a computer museum…

You should be able to get the tty on the remote server into a usable state with the command (run on the remote server, immediately after logging in):

stty sane

After you’ve got the terminal working, look for commands like stty or tput in the shell startup scripts which might be doing strange things to the tty.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.