How to get the width of terminal window in Ruby May 9, 2023 by Tarik There is a common unix command: tput cols This returns the width of the terminal.