This page shows how to install the NVIDIA drivers from the command line, using either the ubuntu-drivers tool (recommended), or apt.

NVIDIA drivers

We package two types of NVIDIA drivers:

ERDs or -server drivers are the only ones that come with "fabric-manager" and "libnvidia-nscq" packages, which you will only need for computing purposes.

The recommended way (ubuntu-drivers tool)

The ubuntu-drivers tool relies on the same logic as the "Additional Drivers" graphical tool, and allow more flexibility on desktops and on servers.

The ubuntu-drivers tool is recommended if your computer uses Secureboot, since it always tries to install signed drivers which are known to work with Secureboot.

Check the available drivers for your hardware

sudo ubuntu-drivers list

or, on servers:

sudo ubuntu-drivers list --gpgpu

You should see a list such as the following:

nvidia-driver-418-server
nvidia-driver-460-server
nvidia-driver-450-server
nvidia-driver-460
nvidia-driver-465

Installing the drivers for generic use (e.g. desktop and gaming)

You can either rely on automatic detection, which will install the driver that is considered the best match for your hardware:

sudo ubuntu-drivers install

Or you can tell the ubuntu-drivers tool which driver you would like installed. If this is the case, you will have to use the driver version (such as "460") that you saw when you used the "ubuntu-drivers list" command.

Let's assume we want to install the 460 driver:

sudo ubuntu-drivers install nvidia:460

Installing the drivers on servers and/or for computing purposes

You can either rely on automatic detection, which will install the driver that is considered the best match for your hardware:

sudo ubuntu-drivers install --gpgpu

Or you can tell the ubuntu-drivers tool which driver you would like installed. If this is the case, you will have to use the driver version (such as "460") and the "-server" suffix that you saw when you used the "ubuntu-drivers list --gpgpu" command.

Let's assume we want to install the 460-server driver (listed as "nvidia-driver-460-server"):

sudo ubuntu-drivers install --gpgpu nvidia:460-server

You will also want to install the following additional components:

nvidia-utils-460-server fabric-manager-460 libnvidia-nscq-460

NOTE: all the additional components, except for fabric-manager and libnvidia-nscq, need to match the driver version and -server suffix (for example, if you installed the 460-server driver, you will need "nvidia-utils-460-server", not "nvidia-utils-460", which belongs to the 460 driver)

Using apt

[ To be continued ]

NvidiaDriversInstallation (last edited 2021-07-29 12:35:32 by albertomilone)