How to find resolution of terminal

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s