Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to find resolution of terminal

📅 2015-Jan-12 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ resolution, terminal ⬩ 📚 Archive

A terminal or console in Linux is a rectangle which displays a certain number of lines and columns of text. This is the resolution I refer to when I talk about terminal or console. This is not the display resolution, which is expressed in units of pixels.

To find the width or the number of columns: tput cols To find the height or the number of lines: tput lines

Tried with: Ubuntu 14.04