List of video devices via terminal

How do you specify computer video devices through the terminal? Is there a team that lists them?

+3
source share
3 answers

To display the video output of devices (e.g. monitors),

$ system_profiler SPDisplaysDataType

To display video input devices (such as webcams),

$ system_profiler SPCameraDataType

To get only device names, filter the list accordingly:

$ system_profiler SPCameraDataType | grep "^    [^ ]" | sed "s/    //" | sed "s/://"
+2
source

system_profiler

+1
source
system_profiler SPDisplaysDataType

or

ioreg | grep -i display

Note that the system_profiler command is case sensitive.

+1
source

Source: https://habr.com/ru/post/1777720/


All Articles