Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to prevent konsole from wrapping lines? It would be great if I could do it without disabling any of the other features like extended colors and other of the fancier things.

share|improve this question
up vote 5 down vote accepted

There's a VT100 control sequence for that, which should be supported by Konsole. It's called DECAWM, and here's how to emit it:

echo -ne '\e[?7l'

My question would be though: why?

share|improve this answer
Well I'm tailing a file and I just need to quickly glance at the first few dozen characters of the line before I look at the rest. I want to be able to see the rest if I choose to, but I want to see the first bit first. This just seems easier than piping my tail through a complex regex – Falmarri Dec 16 '10 at 6:18
'less' might be the tool for you then. Invoke it with the -S (or --chop-long-lines) option to stop it from wrapping lines. You can scroll left and right with the cursor keys. Hit F (uppercase, i.e. with Shift down) to make 'less' tail the end of the file. – ak2 Dec 16 '10 at 9:41
+1 for your suggestion of less! – Josh Dec 16 '10 at 14:19
I didn't think about less. Thanks – Falmarri Dec 20 '10 at 1:58
...if you try the escape sequence: then to re-enable the wrap echo -ne '\e[?7h' – Peter.O Apr 26 '11 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.