开发者

list video devices via terminal

开发者 https://www.devze.com 2023-01-27 10:27 出处:网络
How do开发者_如何学运维 you list a computer\'s video devices via terminal? Is there a command that lists them?To list video output devices (e.g. monitors),

How do开发者_如何学运维 you list a computer's video devices via terminal? Is there a command that lists them?


To list video output devices (e.g. monitors),

$ system_profiler SPDisplaysDataType

To list video input devices (e.g. webcams),

$ system_profiler SPCameraDataType

To get just the device names, filter the list accordingly:

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


system_profiler


system_profiler SPDisplaysDataType

or

ioreg | grep -i display

Note that the system_profiler command is case sensitive.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号