How to install Nvidia video drivers on Linux?


In a previous article I shared with you a general method to install the AMD drivers on our system, now it's the turn for the Nvidia drivers. And with that we will share with you a general method to install these drivers in Linux.

Before starting the installation it is necessary that we know the model of our video card in order to download the appropriate driver from the official Nvidia website.

Just open the terminal and run the following command in it:

lspci | grep VGA

And we will receive the model on the screen.

Now also to download the driver we must know the architecture of our system, which we can know by typing in the terminal:

uname -m

Once this is done, we can go to the official Nvidia website and download the appropriate driver for our model, the link is this.

Driver Download

Generally, the version of the driver is usually the same for everyone and I say this speaking if our card is more or less recent, taking into account the last 5 years.

Entonces we can install a more current version of the long-support driver at this time, just type the following command in terminal, in case your system is 32-bit:

wget -O

If your system is 64-bit, the command to download the version for your architecture is:

wget -O

As well we may be using a more current short-lived version of the driver at this time, We do this by typing in terminal in case of having a 32-bit system:

wget -O

And if your system is 64 bits must type the following:

wget -O

Installing the Nvdia video driver on Linux

Once the download is done, it is important that we remember where the file was downloaded, as we will have to stop the graphical user session to install the driver on the system.

To stop the graphical session of the system, for this we must type one of the following commands depending on the manager that we are using and we must execute the following combination of keys, Ctrl + Alt + F1-F4.


Here we will be asked for our system login credentials, we log in and execute:


sudo service lightdm stop


sudo /etc/init.d/lightdm stop


sudo service gdm stop


sudo /etc/init.d/gdm stop


sudo service mdm stop


sudo /etc/init.d/kdm stop


sudo service kdm stop


sudo /etc/init.d/mdm stop

Now We must position ourselves in the folder where the file was downloaded and we give it execution permissions with:

sudo chmod +x

Y finally we must run the installer with:

sudo sh

At the end of the installation we must re-enable the session with:


sudo service lightdm start


sudo /etc/init.d/lightdm start


sudo service gdm start


sudo /etc/init.d/gdm start


sudo service mdm start


sudo /etc/init.d/kdm start


sudo service kdm start


sudo /etc/init.d/mdm start

You can also choose to restart the computer so that the new changes and the driver are loaded and executed at system startup.

How to uninstall the NVIDIA driver on Linux?

In case we have to uninstall the Nvidia video driver from our systems, either because you had problems with the driver or you simply prefer to go back to using the open source video drivers.

For this It is necessary that we keep the file that we downloaded because it will support us with the process of uninstalling the system.

We just have to execute the following command.

sudo sh  --uninstall

You must remember that you have to stop the graphical session, so you must do it with the commands described above.

After uninstalling, we must re-enable the graphical session, with one of the commands described above and we can verify that we no longer have the driver installed.

You can also choose to just reboot the system so that the new changes are loaded at system startup.

The content of the article adheres to our principles of editorial ethics. To report an error click here.

8 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   mlpbcn said

    Because to complicate your life, install Manjaro and the Nvidia driver and whatever installs itself. When you install Manjaro it asks you if you want the free driver or the owner and if later you want to change, for example, you have the owner installed, with a single click the owner is uninstalled and the free driver is installed and the same thing happens with the kernel one click and you have the kernel installed and the modified grub and the applications are installed in a very short line in the terminal and there is no repository to add. Head over to Manjaro and enjoy your time and don't waste time installing drivers.

  2.   zicoxy3 said

    Man, automating the installation of the nvidia or other drivers is much easier as Manjaro or Linux Mint does, but it is about knowing the steps and helping people who do not use distros with those "advantages" such as Debian .
    It is also used to learn how to do it by terminal, the orders, what each thing does…. I don't know, I like these tutorials.

  3.   mlpbcn said

    Look at that I agree with you Zicoxy3, but you will not deny me that if we want people to lose their fear of linux it would be good if not only two distros, which are precisely the first in distrowach, if I already know that distrowatch is relative , but they are the first. I have also learned a lot with these tutorials, keep in mind that I started in computing with an Amstrad cpc 464, that when you bought the magazine at the kiosk, because the Internet obviously did not exist, several pages came to you with the source code of some game and if you wanted to play you had to copy everything and then with the pc I started with ms-dos 3.30 and everything was based on the command line. But now I prefer the "advantages" that Manjaro gives me and I repeat, there should be more distros with these advantages so that more people switch to Linux, but never without losing the enormous potential of the terminal, which I continue to use but I prefer not to break my head, otherwise it is necessary.

  4.   01101001b said

    Fantastic tutorial! Now I see why I had problems uninstalling those drivers :) I'm also happy for the people who have it easy with Manjaro. Personally, I prefer a smaller distro (300MB), that does everything I need, add only what I want and with which I also learn from this marvel of OS (although sometimes it is fighting for a while with some drivers ;-)

  5.   Daxer said

    The service stop command none works, it does not let me stop the services and it does not find the repositories.

  6.   yougames said

    Daxer happens to me the same in xubuntu 18.04.4 and I don't know how else to do to install the driver because it gives me 2 errors I think I'd better go back to windows

  7.   Richard said

    How unfortunate, that is why Linux will hardly exceed 2% of use, how difficult it is to install a driver on this system

  8.   emerson said

    as always happens, the writer believes that the reader knows the same as he does
    And when it comes to this ox cart that is linux, for the ignorant, it is complicated
    I have a machine with windows10 and AVLinux, and I just installed a graphics card, and I have had, (rather I am trying) to install the drivers
    On windows, of course, 20 seconds, three clicks
    In Linux the usual breech birth, which forces me to swallow lots of useless things, ... and waste my time
    First of all, if you lower the driver, so far so good
    Then the wise man lets me know that I must "stop the graphical user session" (shit, parrot) that I imagine it must be that I must move only with the console, or who knows what that is, because the man does not explain it ..
    And if I can't see what to do in the browser, how do I follow the instructions ?????
    Not counting that it also says: "It depends on what you are using ..." and after logging in, go to know where, it asks you to use a command, (one) of a long list that you see to know which is the one that corresponds to you , because he does not tell you what each of the acronyms corresponds to, (he does know, but he does not tell you, so that you understand that he belongs to the Olympus of the gods and you are a m ... pricked on a stick)
    At this point, of course I continue my usual pilgrimage through google of when things like this happen to me in Linux, until I find someone who KNOWS Explain what they intend to explain to those who do not know, and not that in an exercise of pure vanity and useless effort, worthy of better objectives than the one that occupies him, and I dedicate my loudest fart to this useless one, according to my objective appreciation