Bash doesn't wrap long lines?

Hi,

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.

7 Replies

The LISH console behaves like this, in my experience, when terminals are wonky. Are you using the LISH console, or are you SSH'd in to your Linode? You should definitely be using SSH for day-to-day work (LISH is for emergencies).

Thank you Jed.

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.

That's not an answer.

Do you make SSH connection with putty to yourlogin@yourlinode,

(qingbo@qingbosdomain.tld, qingbo@liXX-XXX.members.linode.com) or to LISH emergency console (linodeXXXXX@datacenterXX.linode.com) ?

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.

@rsk:

. 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.

– David

Sorry I didn't make it clear.

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.

I cannot know nor check if this is in any way related to your troubles, but still…

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* ti@:te@

No idea what is means though :-p

Hope it helps.

Thank you very much tinono!!

Reinstalling termcap solved the problem.

Thanks

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct