Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I get the current display resolution from the command line in OS X?

share|improve this question
add comment

2 Answers

up vote 27 down vote accepted
system_profiler SPDisplaysDataType | grep Resolution
share|improve this answer
2  
On a Macbook pro (10.8.3) this only returns the LCD's max resolution, not the current/selected display resolution. –  studgeek Jun 3 '13 at 16:12
1  
On my Air running 10.8.4 with an external display, this shows both the Air's resolution and the external display's resolution, on separate lines. –  Jim Stewart Jul 9 '13 at 21:59
add comment

For a quick reading on the current virtual resolution of a single retina display:

$ osascript -e 'tell application "Finder" to get bounds of window of desktop'
0, 0, 2048, 1280

Results for multi-monitor setups vary based on which display is primary and how they are arranged. Read more here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.