lshw command in Linux with Examples Read Courses Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report lshw(list hardware) is a small Linux/Unix tool which is used to generate the detailed information of the system’s hardware configuration from various files in the /proc directory. lshw can also report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache memory configuration, bus speed, etc on DMI-capable x86 or IA-64(Itanium family of 64 microprocessors) system and some PowerPC machine. This command needs root permission to show full information else partial information will be displayed. Syntax: lshw [-format] [-options ...] Where format can be: -html: Output hardware tree as HTML. -xml: Output hardware tree as XML. -short: Output hardware paths. -businfo: Output bus information. Example 1: To display full hardware information. Input: Output: Example 2: Lists hardware in a compact format. Input: Output: Options: -class CLASS: This option is used when we only want lshw command to show a certain class of hardware. Example 1: To lists all disks and storage controllers in the system. Example 2: To lists all network interfaces in HTML file say geeksforgeeks.html. Input: A file namely geeksforgeeks.html will be created in the home directory as soon as we execute the command. The image shown below is the output displayed in the created html file. Output: -disable TEST, -enable TEST : This option is used to enable or disable a test like pci, isapnp, cpuid, usb, network, dmi, device-tree, cpuinfo, spd, etc. Example: To enable pci. Input: Output: -quiet: This option is used when the user don’t want lshw to display status. -sanitize: This option is used to sanitize output i.e. when we don’t want sensitive information like serial numbers, etc to be displayed. Example: To check hardware information without the serial number or any other sensitive information. Input: Output: You can see in the fourth line of the above output, the serial number is not displayed instead it shows [REMOVED]. -numeric: This option is used to when the user also want lshw to display numeric IDs (for PCI, USB, etc.) Example: To check numeric IDs of class disk. -version: Displays the version of lshw and exits. –help: Display help related information, available command line options and exit. Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now! Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore. Last Updated : 23 May, 2019 Like Article Save Article Previous lsmod command in Linux with Examples Next lsusb command in Linux with Examples Share your thoughts in the comments Add Your Comment Please Login to comment...