Bash doesn't wrap long lines?
I just got a linode with CentOS 5.3 installed (updated to 5.4 later). But when I type in a long command in ssh, it shows the command in one line, with the left side truncated, showing only a ">" character.
I know linode just includes the most necessary packages in the default image, but I'm wondering which package is needed to let bash behave like I see in the normal default installs? Or is it a bash configuration option?
Thanks in advance.
I'm using putty on Windows to connect to my CentOS linode. I also use it to connect to some other Linux machines but this is the first time I see such behavior of bash.
Do you make SSH connection with putty to [email protected],
If you're doing the latter, switch to the former. LISH, from mym understandng, emulates a serial terminal, 80x24. You can eventually change its dimesions with STTY, but it's verily not recommended.
. You can eventually change its dimesions with STTY, but it's verily not recommended.
Other than the hassle of having to do it, there's absolutely nothing wrong with adjusting the terminal size if you want over LISH. Terminal size is just a setting like any other; you don't hurt anything by changing it. True, as an virtual serial port LISH misses the automatic communication about size changes we've all grown to expect over other connections, but that certainly doesn't mean it can't handle different sizes.
I do agree with the point that there's little reason to use LISH if you have normal network access to your Linode, but if you do have to work through LISH, no reason you can't be comfortable and use a virtual console with large dimensions, or just ensure apps through LISH wrap properly within your client window.
I was connecting directly to the IP address as root.
I'm relatively new to Linux so I don't know if there's anything wrong with these outputs?
# stty -a speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -cdtrdsr -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke</undef></undef></undef>
If I resize the Terminal (currently connecting from a Mac) window, stty does reflects the size changes.
Thank you very much.
Linode's CentOS image ships a borked termcap package, the file /etc/termcap is empty.Reinstall termcap from the centos repos. This solved many terminal problems for me. (like ctrl+L not clearing the screen).
Also if you're using screen and long lines also don't wrap, adding this line in .screenrc solved it for me :
termcapinfo xterm* [email protected]:[email protected]
No idea what is means though :-p
Hope it helps.