Mac Tip: Find your screen resolution, through a command line

OSX Terminal

OSX Terminal

How do you find a Screen Resolution from a Command Line in Mac OS X

Most Mac users will jump right to there Displays system preference panel to find their resolution. There’s nothing wrong with that, it’s quick and easy, and for the most part, it’s how I find it myself. However, it does require a graphical interface and because of this it’s not very helpful for scripting or remote management through SSH connections. In these cases you may want to use a command line.


You can find the screen resolution with OSX’s built in system_profiler command, which pulls the same detailed system information from the Apple System Profiler Utility but as a command line.

 

The system_profiler command and syntax is:

system_profiler SPDisplaysDataType | grep Resolution
 

Terminal output should read and should look something like the following:

 Note: I have 3 displays and shows them all

office:~ thomasfraley$ system_profiler SPDisplaysDataType | grep Resolution
          Resolution: 5120 x 2880 Retina
          Resolution: 1920 x 1200
          Resolution: 1920 x 1200
office:~ thomasfraley$ 
Thomas Fraley
I am a tech enthusiast whose main focus is making technology easy again for everyone. Educated with degrees in network engineering and project management. I've worked in the entertainment industry for a decade as a director of information technology for global companies pioneering the way. A few years ago I decided to give back and have been helping young entrepreneur startups off on the right foot.
www.lifewithtech.net
Previous
Previous

FirstLook: Sensei Wireless gaming mouse

Next
Next

Tip: Remove bad SSH Key with an easy command