How to detect the exists of the Nvidia graphics cards

To detect the exists of the graphics cards on the computer, we may use command lshw.

A simply way to use the command is:

$ lshw -numeric -C display
*-display
description: VGA compatible controller
product: GP106M [GeForce GTX 1060 Mobile] [10DE:1C20]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:16 memory:dc000000-dcffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:e000(size=128) memory:dd000000-dd07ffff
*-display
description: VGA compatible controller
product: Intel Corporation [8086:591B]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:128 memory:db000000-dbffffff memory:70000000-7fffffff ioport:f000(size=64) memory:c0000-dffff

The above output indices my laptop has 2 VGA controllers. An Nvidia GeForce GTX 1060 dedicated card, and an Intel integrated graphic card.

Sometimes this command may not installed, we should install it first.

For Ubuntu users, we may use command

apt-get install lshw -y

For CentOS/Fedora users, we may use command

yum install lshw -y

And then, try again.

Command lspci is also a good solution. However, it may doesn’t work if your driver does not installed correctly.

See also:

How to find the package by name