in linux console, how to NOT wrap output

Line wrap disabling support is terminal dependent. For example if using screen you can hit Ctrl-A Ctrl-R to toggle line wrap.

Otherwise, you might try setterm -linewrap off with or without increasing the number of terminal columns with stty (haven't tried this).

Terminal emulators like PuTTY (if you connect to the server from a Windows box) have their own settings.

If the terminal supports VT escape codes, echo -ne "\x1b[7l" will disable screen wrap (echo -ne "\x1b[7h" will enable it).

Notice that what works in one terminal might not work in another - for example I'm now on a PuTTY window on a Linux OpenSuSE 12.3 with bash, using screen: its control sequence works perfectly, while VT codes and term do not. On a text-mode console on a older SuSE 11 (not GUI), the VT sequence works (probably screen would, too), stty is apparently ignored.

Tags:

Linux

Terminal