Default tab width for Mac OS X Terminal.app is 8. I want to change it to 2. How can I do it?

I've found tabs command, but I can't figure out how to use it.


To set your tab with to 2 spaces, use this command in the Terminal App:

tabs -2

Replace 2 with your desired width in spaces.

View the full manual for tabs to learn about all options.

  • I can't get tabs command to work properly. If I try echo $'12345678|\n\t|' on a new Terminal, I can see the default 8 tab width working correctly. But if I try tabs -4; echo $'1234|\n\t|' I get misaligned pipe symbols. Is this a bug in Terminal? – Tobia Aug 7 '14 at 13:18
  • Works as expected for me with correct alignment. What is your terminal windows size, what version of OSX are you on and what font (and font size) are you using ? – Rob Cowell Aug 8 '14 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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