How can I list displays and their available resolutions from the command line?
Use get requests to discover the display identifiers and available modes before writing a command that changes them. With the BetterDisplay CLI set up, start with:
betterdisplaycli get -identifiers
betterdisplaycli get -identifier=name
The first request returns identification details. The second returns display names. To list modes for a specific connected display:
betterdisplaycli get -name="Desk Display" -displayModeList
Replace Desk Display with the display’s actual name. Mode rows include a mode number, desktop dimensions, HiDPI status, refresh rate, bit depth and relevant flags such as Current or Default. The mode list requires the display to be connected. Listing a remembered display’s identity does not make its modes available while disconnected.
For the rendering background, see how macOS scaling, HiDPI and LoDPI work.
Use an unambiguous name or an appropriate identifier when several displays are present. A command without a device selector can apply to multiple eligible devices. Treat the returned modes and identifiers as belonging to the current configuration, not universal numbers to copy between Macs or assume will remain unchanged after reconnecting. See device selection and mode examples and the CLI reference.