Quantcast
Channel: Notes of a SysAdmin » Drew
Viewing all articles
Browse latest Browse all 10

Terminal Entry Overlapping Resolved

$
0
0

Have you ever typed into the terminal, through an SSH session and the text overlaps the same line and causes you to lose track of what you were typing? This is so frustrating and has everything to do with how the terminal is interpreting the number of columns the kernel states that you have. The fix is pretty simple; all you have to do is resize your terminal using stty.

First, let’s see if the terminal can fix itself. Check to see how many columns your terminal is set to:

[root@server:~]# stty -a |  awk '/columns/ { print $6 }' 
127

Now, resize your window on your SSH session. Then re-run the command:

[root@server:~]# stty -a |  awk '/columns/ { print $6 }'
207

If the value changed, you should be good, however, if it did not change you will have to manually change it to something bigger. This value is up to you. To change the value, issue the following command:

[root@server:~]# stty cols 207     # Where 207 is the number of columns set
# nothing should be returned
 
# Now verify the setting took affect
[root@server:~]# stty -a |  awk '/columns/ { print $6 }'
207    # Sample output

Viewing all articles
Browse latest Browse all 10

Trending Articles