Linux: get screen resolution from shell

To get current dispay resolution on Linux using shell (bash) you can use default application xrandr.

user@host ~ $ xrandr -d :0

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1824 x 984, current 1824 x 984, maximum 1824 x 984
default connected 1824x984+0+0 0mm x 0mm
1824x984 0.0*

 

Leave a Reply

Your email address will not be published. Required fields are marked *