17

The closest thing I know of is system_profiler but it spits out way too much unnecessary information and I don't have a good way to filter / transform that output.

What's the closest alternative to something like lshw or lspci on Mac OS X?

4
  • 3
    Have you tried sysctl? I think sysctl machdep gives some information pertaining to your machine. Apr 10 '16 at 4:50
  • 1
    @perhapsmaybeharry Nice suggestion with sysctl. Not quite what I'm looking for though.
    – voices
    Apr 16 '16 at 15:30
  • 1
    Why not awk | grep | sed out the undesired information? system_profiler and ioreg are the canonical tools to enumerate hardware details on macOS.
    – bmike
    Mar 13 '17 at 9:48
  • @bmike I do, for the most part, or when I need to.
    – voices
    Apr 13 '17 at 16:54
11

Try parsing the output of the ioreg command.

I tried ioreg -l | grep PCI and got a bunch of info.

1
  • Thanks for the suggestion. I will try it out and let you know how it goes.
    – voices
    Jun 1 '16 at 23:51
2

For those familiar with Docker, a simple workaround is to run a simple ubuntu container, and install lshw in there. I have found it to work great.

1
  • 1
    This shows the hardware in the Docker VM, not the host. Jul 23 '21 at 15:45
0

This is a working solution LSPCI for Mac

You have to install it and reboot, then LSPCI command will work, but need to execute with sudo, it needs root access.

3
  • This comes from Hackintosh, and the page seems to crash anyway May 5 '19 at 16:20
  • You might have to disable adblock
    – Niresh
    May 6 '19 at 12:31
  • Link is broken.
    – nohillside
    Mar 19 '21 at 9:18
-1

You might want to try dspci console utility from the open-source DPCIManager project. I must warn you though, that the software is coming from the Hackintosh/OSx86 world and the DPCIManager.app offers extra functionality in addition to listing PCI devices that is not at all safe to run on a real Mac, so please avoid using anything from that package except the dspci utility which only does listing PCI devices in your system (like lspci in Linux).

5
  • That sounds like it would be good; if it was native. I think you're kind of on the right track, though. Thanks for the suggestion.
    – voices
    Mar 13 '17 at 9:56
  • FYI: lshw, lspci, lsusb, etc. are all available from external sources too.
    – voices
    Mar 13 '17 at 9:59
  • 1
    @tjt263, right, there are both macOS ports of pciutils and libusb (I suspect that lspci and lsusb are included in the respective source trees as examples/handy utils). There are also wrapper shells available that use e.g. system_profiler SPUSBDataType as a datasource and try to behave like lsusb or whatever.
    – kervich
    Mar 13 '17 at 14:33
  • That's right. I do recall the lsusb package distributed via brew, basically being just a wrapper, clone, or alias for something like system_profiler SPUSBDataType.
    – voices
    Mar 14 '17 at 10:13
  • 1
    @tjt263 brew says : No formula found for "/pciutil/". No formula found for "/lshw/". No formula found for "/lsusb/". No formula found for "/lspci/". Where ? Can you please be more precise and give URLs ?
    – SebMa
    Jul 15 '17 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .