Which of the following choices will give you a clean installation of ubuntu linux?

This edition of Quickstart guide describes the installation process of NVIDIA® Drivers for supported Linux distributions.

Introduction

The purpose of this document is to provide some quick start notes for installing NVIDIA drivers on Linux distributions for servers. For more comprehensive information on installing CUDA Toolkit and drivers on various Linux distributions (for both workstation and server variants), refer to the CUDA Installation Guide for Linux.

1.1. Pre-Installation Requirements

Before installing the NVIDIA driver on Linux, some pre-installation steps are recommended to:

  1. Verify the system has a CUDA-capable GPU
  2. Verify the system is running a supported version of Linux
  3. Verify the system has build tools such as make, gcc installed
  4. Verify the system has correct Linux kernel headers

For more detailed steps on completing each of these pre-installation steps, refer to the pre-installation actions in the CUDA Installation Guide for Linux.

Note: Mixing installation methods (e.g. .run installers and .deb/.rpm packages) may result in driver conflicts and an unusable system. Refer to this section in the guide above for other pre-install actions to handle conflicting installation methods.

2. Runfile Installers

NVIDIA drivers are available as .run installer packages for use with Linux distributions from the NVIDIA driver downloads site. Select the .run package for your GPU product.

This page also includes links to all the current and previous driver releases: https://www.nvidia.com/en-us/drivers/unix.

The .run can also be downloaded using wget or curl as shown in the example below:

$ BASE_URL=https://us.download.nvidia.com/tesla

$ DRIVER_VERSION=450.80.02

$ curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run

Once the .run installer has been downloaded, the NVIDIA driver can be installed:

$ sudo sh NVIDIA-Linux-x86_64-$DRIVER_VERSION.run

Follow the prompts on the screen during the installation. For more advanced options on using the .run installer, see the --help option or refer to the README.

3. Package Managers

The Package Manager installation interfaces with your system's package management system. When using RPM or Deb, the downloaded package is a repository package. Such a package only informs the package manager where to find the actual installation packages, but will not install them.

3.1. Ubuntu LTS

This section includes instructions for installing the NVIDIA driver on Ubuntu 16.04 LTS and Ubuntu 18.04 LTS distributions using the package manager.

  1. The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. The kernel headers and development packages for the currently running kernel can be installed with:

    $ sudo apt-get install linux-headers-$(uname -r)

  2. Install the CUDA repository public GPG key. This can be done via the cuda-keyring package or a manual installation of the key. The usage of apt-key is deprecated.

    $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')

    $ wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.0-1_all.deb

    $ sudo dpkg -i cuda-keyring_1.0-1_all.deb

  3. Update the APT repository cache and install the driver using the cuda-drivers meta-package. Use the --no-install-recommends option for a lean driver install without any dependencies on X packages. This is particularly useful for headless installations on cloud instances.

    $ sudo apt-get -y install cuda-drivers

  4. Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

3.2. Red Hat Enterprise Linux 8

This section includes instructions for installing the NVIDIA driver on RHEL 8 using the package manager.

  1. If not done already (for example when using RHEL on cloud instances), register the system using subscription-manager. For more information, refer to this KB article on the Red Hat Customer Portal.

    $ sudo subscription-manager register --username <insert-username> --password <insert-password> --auto-attach

  2. Satisfy the external dependency on EPEL for DKMS and enable any optional repos for RHEL 8 only.

    $ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

    $ sudo subscription-manager repos --enable codeready-builder-for-rhel-8-${ARCH}-rpms --enable rhel-8-for-${ARCH}-baseos-rpms --enable rhel-8-for-${ARCH}-appstream-rpms

  3. Install the CUDA repository public GPG key.

    $ distribution=$(. /etc/os-release;echo $ID`rpm -E "%{?rhel}%{?fedora}"`)

  4. Setup the CUDA network repository.

    $ sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-rhel8.repo

  5. The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. For RHEL 8, ensure that the system has the correct Linux kernel sources from the Red Hat repositories:

    $ sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

  6. The choice of the driver package depends on the stream and profile to be used as shown below:

    $ sudo dnf module install nvidia-driver:<stream>/<profile>

    stream depends on the driver branch and type (e.g. precompiled). To install the latest driver, choose the latest-dkms driver stream. For more information on the supported streams, refer to the support matrix.

    profile by default is "default" and does not need to be specified. Supported profiles can be chosen based on the use-case:

    Table 1. List of driver profiles available

    StreamProfileUse-case
    Default /default Installs all the driver packages in a stream.
    Kickstart /ks Performs unattended Linux OS installation using a config file.
    NVSwitch Fabric /fm Installs all the driver packages and components required for bootstrapping an NVSwitch system.

  7. Update the repository cache and install the driver using the nvidia-driver meta-package. In this example, we use the default profile. For NVSwitch systems, use nvidia-driver:latest-dkms/fm.

    $ sudo dnf -y module install nvidia-driver:latest-dkms

  8. Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.
  9. Optionally, if tearing down a cloud instance with RHEL, remove and unregister entitlements from Red Hat if the instance is no longer required.

    $ sudo subscription-manager remove --all

    $ sudo subscription-manager unregister

3.3. CentOS 8

This section includes instructions for installing the NVIDIA driver on CentOS 8 using the package manager.

  1. In some cases, you may need to install some additional dependencies that are required for installing the NVIDIA drivers.

    $ sudo dnf install -y tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel

  2. Enable the PowerTools repo and set up the external dependency on EPEL for DKMS.

    $ sudo dnf config-manager --set-enabled PowerTools

    $ sudo dnf install -y epel-release

  3. Install the CUDA repository public GPG key.
  4. Setup the CUDA network repository.

    $ sudo dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-$distribution.repo

  5. The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. For CentOS 8, ensure that the system has the correct Linux kernel sources from the CentOS repositories:

    $ sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

    Note that in some cases, you may have to update the running kernel as a pre-requisite:

    $ sudo dnf install -y kernel kernel-core kernel-modules

  6. The choice of the driver package depends on the stream and profile to be used as shown below:

    $ sudo dnf module install nvidia-driver:<stream>/<profile>

    stream depends on the driver branch and type (e.g. precompiled). To install the latest driver, choose the latest-dkms driver stream. For more information on the supported streams, refer to the support matrix.

    profile by default is "default" and does not need to be specified. Supported profiles can be chosen based on the use-case:

    Table 2. List of driver profiles available

    StreamProfileUse-case
    Default /default Installs all the driver packages in a stream.
    Kickstart /ks Performs unattended Linux OS installation using a config file.
    NVSwitch Fabric /fm Installs all the driver packages and components required for bootstrapping an NVSwitch system.

  7. Update the repository cache and install the driver using the nvidia-driver meta-package. In this example, we use the default profile. For NVSwitch systems, use nvidia-driver:latest-dkms/fm.

    $ sudo dnf -y module install nvidia-driver:latest-dkms

  8. Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

3.4. Red Hat Enterprise Linux 7

This section includes instructions for installing the NVIDIA driver on RHEL 7 using the package manager.

  1. If not done already (for example when using RHEL on cloud instances), register the system using subscription-manager. For more information, refer to this KB article on the Red Hat Customer Portal.

    $ sudo subscription-manager register --username <insert-username> --password <insert-password> --auto-attach

  2. Satisfy the external dependency on EPEL for DKMS and enable any optional repos for RHEL 7.

    $ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    $ sudo subscription-manager repos --enable="rhel-*-optional-rpms" --enable="rhel-*-extras-rpms"  --enable="rhel-ha-for-rhel-*-server-rpms"

  3. Install the CUDA repository public GPG key.

    $ distribution=$(. /etc/os-release;echo $ID`rpm -E "%{?rhel}%{?fedora}"`)

  4. Setup the CUDA network repository.

    $ sudo yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-$distribution.repo

  5. The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. For RHEL 7, ensure that the system has the correct Linux kernel sources from the Red Hat repositories:

    $ sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

  6. Update the repository cache and install the driver using the nvidia-driver-latest-dkms meta-package.

    $ sudo yum clean expire-cache

    $ sudo yum install -y nvidia-driver-latest-dkms

  7. Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.
  8. Optionally, if tearing down a cloud instance with RHEL, remove and unregister entitlements from Red Hat if the instance is no longer required.

    $ sudo subscription-manager remove --all

    $ sudo subscription-manager unregister

3.5. CentOS 7

This section includes instructions for installing the NVIDIA driver on CentOS 7 using the package manager.

  1. In some cases, you may need to install some additional dependencies that are required for installing the NVIDIA drivers.

    $ sudo dnf install -y tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel iptables firewalld vim bind-utils wget

  2. Satisfy the external dependency on EPEL for DKMS.

    $ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

  3. Install the CUDA repository public GPG key.
  4. Setup the CUDA network repository.

    $ sudo yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-$distribution.repo

  5. The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. For CentOS 7, ensure that the system has the correct Linux kernel sources from the CentOS repositories:

    $ sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

  6. Update the repository cache and install the driver using the nvidia-driver-latest-dkms meta-package.

    $ sudo yum clean expire-cache

    $ sudo yum install -y nvidia-driver-latest-dkms

  7. Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

3.6. SUSE Linux Enterprise Server 15

This section includes instructions for installing the NVIDIA driver on SLES 15 using the package manager.

  1. Install the CUDA repository public GPG key.

    $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.[0-9]//')

  2. Setup the CUDA network repository.

    $ sudo zypper ar http://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-$distribution.repo

  3. If not already done, activate the SUSE Package Hub with SUSEConnect. On OpenSUSE systems, this step can be skipped.

    $ sudo SUSEConnect  -p PackageHub/15.1/x86_64

  4. Update the repository cache.
  5. The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed. For SUSE, ensure that the system has the correct Linux kernel sources from the SUSE repositories.

    Use the output of the uname command to determine the running kernel's version and variant:

    $ uname -r 
    4.12.14-lp151.27-default

    In this example, the version is 4.12.14-lp151.27 and the variant is default. The kernel headers and development packages can then be installed with the following command, replacing <variant> and <version> with the variant and version discovered from the previous uname command:

    $ sudo zypper install -y kernel-<variant>-devel=<version>

  6. Proceed to install the driver using the cuda-drivers meta-package.

    $ sudo zypper install -y cuda-drivers

  7. On SUSE systems, add the user to the video group.

    $ sudo usermod -a -G video <username>

  8. A reboot of the system may be required to verify that the NVIDIA driver modules are loaded and the devices visible under /dev.
  9. Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.


Which of the following would you enter at the Linux command line to shut down Linux immediately?

To shutdown Linux using the command line: To shutdown the Linux system open a terminal application. Then type “ sudo shutdown -n now ” to shutdown the box. Then wait for some time and the Linux server will poweroff.

What are your top 3 Favourite Linux commands tools this question is required?

Top 50 Linux Commands You Must Know as a Regular User.
ls - The most frequently used command in Linux to list directories..
pwd - Print working directory command in Linux..
cd - Linux command to navigate through directories..
mkdir - Command used to create directories in Linux..
mv - Move or rename files in Linux..

Is Linux commands case sensitive?

The Linux operating system provides you with multiple commands that you can run in the terminal to find a specific file. Although, most of these commands are case sensitive, meaning that you need to know the exact name of your file and whether it is in lower-case or upper-case letters or a combination of both.

When typing a path at the DOS prompt What symbol do you use to separate directory names from other directory names or file names?

To use multiple filename parameters, separate each file name with a space, comma, or semicolon. You can use wildcard characters (* or ?), to represent one or more characters of a file name and to display a subset of files or subdirectories.