This is what I am trying to do. I downloaded the latest driver for my VGA from The installation needs the X11 to be shut down, so I log out of my account, then press Ctrl+Alt+F1, then log in with my username and password, then run the command


in every possible way, I have even tried CHMODing the package with 777 permissions, but still I'm getting the

sh: can't open

error. Any help would be greatly appreciated.

  • 4
    Is there a reason you're trying to install it by hand? Ubuntu can install the driver for you:… – Jorge Castro Oct 14 '11 at 17:57
  • Do not use the nvidia installer from, it's not compatible with Ubuntu and you'll certainly run into issues when upgrading. If you're trying to get a recent card to work on a notebook, you'll fail because recent cards are Optimus ones. – Lekensteyn Oct 14 '11 at 18:07
  • With a 9 series card, I have updated the driver about five times and they work perfectly. – Trevor Oct 14 '11 at 18:12
up vote 14 down vote accepted

Make sure that no proprietary drivers are installed. If they are, un-activate them - otherwise, they WILL cause problems.

This is the procedure I use:

  • Press Ctrl + Alt + F1.

  • Login

  • cd to the location of the file (only if it is in a location other than your $HOME directory)

  • Thereafter, run the following commands:

    sudo su
    sudo service lightdm stop ## if you are using 11.04 replace `lightdm` with `gdm`
    chmod +x
    sudo sh

The installer will then complain about Nouveau needing to be disabled. It will do so, then you will need to restart your PC. You will then have to redo the above mentioned procedure again to restart the installation.

If you have another driver installed, this installer will uninstall it for you.

Works every time for me.

See also:

  • PLEASE NOTE that installing Nvidia driver of version 319.23 this way failed for me - I got a blank screen upon startup and spent a day of tweaking Ubuntu from the console to revert the old X server configuration - I have Nvidia Quadro FX 1800M graphcis card. As per Nvidia driver additional info: Note that many Linux distributions provide their own packages of the NVIDIA Linux Graphics Driver in the distribution's native package management format. This may interact better with the rest of your distribution's framework, and you may want to use this rather than NVIDIA's official package. – Yura Jun 25 '13 at 10:12

The guide works for 12.04 LTS and 14.04 LTS as well.

For the test I took one of the latest Nvidia drivers released by official Nvidia.

Download the driver from Nvidia official Source.

Download link #1

Download link #2

it'll be named something like for example.

before going to do anything backup your current nvidia configuration simply run:

sudo nvidia-xconfig

it'll automatically backup your current configuration and create a new config file.

Disable conflicting software (recommended!) to avoid any problems during installation. Open or create the /etc/default/linux-restricted-modules-common file with an editor, in Ubuntu use:

gksudo gedit /etc/default/linux-restricted-modules-common

and paste or replace a line:

DISABLED_MODULES="nv nvidia_new"

Done! Now remove what is installed:

login to TTY terminal (Ctrl+Alt+F1) and remove and purge your current configuration doing next commands:

sudo /etc/init.d/lightdm stop

(or whatever display manager installed on your system xdm for Xubuntu kdm for Kubuntu for example)

sudo apt-get install build-essential linux-headers-`uname -r`

or find the right ones for your platform with command uname -r for example:

sudo apt-get install build-essential linux-headers-`3.8.0-36-generic`

(if it says already the latest installed or something like that go next)

sudo apt-get remove --purge nvidia*

(removes nvidia-common for some might need to sudo apt-get install ubuntu-desktop to bring it back manually, wasn't necessary for me)

sudo rm /etc/X11/xorg.conf

(removes xorg configuration)

After you finish with this one, you should also blacklist the nouveau driver by editing this file:

sudo gedit /etc/modprobe.d/blacklist-nouveau.conf

…and add these lines at the end:

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

And you can also disable the Kernel Nouveau by typing these lines in a terminal window:

echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf

and after that:

sudo update-initramfs -u

or you can remove nouveau from the system:

sudo apt-get remove --purge xserver-xorg-video-nouveau

(WARNING! removes open-source video driver from the system! the step is optional, I did this to prevent all conflicts with Nvidia do this at your own risk or leave it alone if you're not sure)

Before continuing you can also install dkms on the way.

(*DKMS is a framework designed to allow individual kernel modules to be upgraded without changing the whole kernel. It is also very easy to rebuild modules as you upgrade kernels.)

sudo apt-get install dkms

Next when all is done, let's install the driver. Navigate to the location where you downloaded driver at, for example:

cd /home/yourname/downloads/

and make it executable and run:

sudo chmod +x

sudo ./

(don't forget to install with a root privileges using sudo otherwise it won't continue)

Click Yes (commonly) during installation pop ups and at the end of installation wizard you'll be asked if you want Nvidia to configure and activate driver for you? Click Yes!

Now you have to bring back the Display Manager:

sudo /etc/init.d/lightdm start


sudo sevice lightdm restart

When logged in do not run sudo nvidia-xconfig as it's already been configured just run gksudo nvidia-settings.

Voila! Done.

The driver works basically on all Nvidia video cards including old ones.


If for any reason after reboot you are not able to login or get stuck during boot make sure you followed all the steps if you did and still got problems login to Recovery Mode press and hold Shift enter Recovery Mode and start Failsafe boot for some reason your xorg.conf maybe named differently even when you run sudo nvidia-xconfig it names itself for example XF86Config it's actually good working configuration and if needed you can just simply rename it:

sudo /etc/init.d/lightdm stop (just to be sure)

sudo mv /etc/X11/XF86Config /etc/X11/xorg.conf

And reconfigure it with:

sudo dpkg-reconfigure xserver-xorg

(Do mention though, if you're using different point releases let say 14.04.2 running this command will return no package installed or etc... you'll have to make sure if any is installed in this case it be xserver-xorg-lts-utopic so you'll have to run sudo dpkg-reconfigure xserver-xorg-lts-utopic instead.)

sudo /etc/init.d/lightdm start

now you should be at the login screen, enter your initials and when logged in run:

gksudo nvidia-settings (just to be sure)

it didn't work!?

When trying to start X, if you get an error about nvidiactl (you will need to see the X log), try the following:

sudo update-rc.d -f nvidia-kernel remove

If you want to go back to the Restricted Manager method after performing the above instructions, do this:

sudo update-rc.d nvidia-kernel defaults

If the installer fails, go through the following checklist:

  • Was Xorg already properly configured for the nv driver?

  • Did you disable the loading of Ubuntu provided NVIDIA drivers using DISABLED_MODULES="nv nvidia_new" in /etc/default/linux-restricted-modules-common? This is a common cause of driver mismatch errors on manual installations due to conflicts with the Ubuntu provided NVIDIA binary driver.

  • You may need to remove the file /lib/linux-restricted-modules/.nvidia_new_installed

  • Did you remove the nvidia-glx/nvidia-glx-legacy/nvidia-glx-new and nvidia-settings packages?

  • Did you read the log found in /var/log/nvidia-installer-log for errors that can guide you?

  • Did you check the output of dmesg ?

  • Did you install the kernel headers (and possibly source package)?

  • Did you check the NVIDIA readme found on their site to make sure your card is supported with that version of driver?


Sometimes it might not work, e.g. with Ubuntu 14.04 LTS, currently there are incompatibilities that may occur with newer linux-image kernels to some video cards and after reboot you might be left with a blank screen.

What you can do then is try this:

Solution 1

Solution 2 (by Takkat)

How do I make Nvidia driver working after the kernel update in 14.04?

When you have manually installed Nvidia driver in 14.04, if the kernel got updated then do not reboot after an update otherwise you will boot to a blank screen.

What shoud I do?

If the workaround with dkms didn't succeed, you will need to re-install the driver. Launch a console Ctrl+Alt+F1 and type:

sudo service lightdm stop

navigate to nvidia .run file location using cd command and re-install nvidia driver press always Yes when prompted. After installation has been finished, type:

sudo service lightdm restart

Login to your account, open a terminal Ctrl+Alt+T and type:

sudo nvidia-xconfig (only if xorg.conf is missing)

gksudo nvidia-settings

sudo update-initramfs -u -k all

sudo reboot

Done. You should login as normal now.

In Ubuntu, there's open source driver called Nouveau. Nouveau makes some troubleshooting in NVIDIA driver installation. Should it to be remove and clean the configuration and comes with NVIDIA driver only for better experiences.

this is way i used to do maybe different with others :


Login and then stop GUI

sudo stop lightdm

remove Nouveau

sudo apt-get --purge remove xserver-xorg-video-nouveau

install NVIDIA Driver

$ cd to the location of the nvidia driver file

(example : cd /home/obysr/Downloads, fo verifying the locationyou could type $ ls)

sudo chmod +x

sudo ./

and then just follow the instruction

for the last restart it

sudo reboot
  • This does not really help, xserver-xorg-video-all is a meta-package that depends on others. Removing it does not remove nouveau. There is the nouveau Xorg driver (xserver-xorg-video-nouveau) and a kernel module installed as nouveau.ko Installing the nvidia-current driver automatically blacklists this module. – Lekensteyn Mar 28 '12 at 20:33
  • I'm very grateful for the response. but video driver comes with group of video graphic drivers. it includes AMD Radeon Driver, nVIDIA Driver, Intel HD Graphics, etc. i'd rather remove all driver from and install pure nvidia driver – obysr Mar 28 '12 at 21:11
  • That's true, but not all of them are in use. Have you noticed what you've actually removed when running sudo apt-get purge xserver-xorg-video-all? It removes just one package (xserver-xorg-video-all), the others are not removed. – Lekensteyn Mar 28 '12 at 21:13
  • thank you, really I didn't know before till you tell me now. i'm about to fix my comments. thank you Lenkensteyn – obysr Mar 28 '12 at 21:24
  • Is there a way to totally uninstall nouveau? I did sudo apt-get purge xserver-xorg-video-all xserver-xorg-video-nouveau. But, nouveau occasionally still seems to come back (I think after running the general Ubuntu updater app, and restarting the machine). When this happens, I usually reinstall the NVIDIA drivers. Kinda annoying. – solvingPuzzles Jul 9 '13 at 1:52

This is a first step for beginners to check extra drivers.

I hope this answer helps anyone who stops by here: Just go to System Settings -> Software and Updates -> Additional Drivers and install the latest NVIDIA driver. Restart your machine afterwards

If after these steps you still do not see your NVIDIA driver you may want to try one of the terminal answers above.

enter image description here

  • I like the approach an should be a first step for new users; but if you do not have the correct packages installed this may not help :( +1 for the first step. – DnrDevil Mar 8 '16 at 23:44
  • @DnrDevil this was done after a fresh 14.04 install – Hakim Mar 9 '16 at 0:44

Trevor and obysr's answers are correct but for me I had to do an additional step as I could not get rid of the Nouveau:

  1. Open /etc/default/grub:
  2. Add nouveau.blacklist=1 to the following line:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.blacklist=1"
  3. Save and exit

  4. Then Run:

    sudo update-grub


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.