Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Please exit X before installing NVIDIA driver

📅 2017-Sep-04 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ driver, lightdm, nvidia ⬩ 📚 Archive


I was trying to install a NVIDIA graphics driver on a machine. The installer failed with this error:

ERROR: You appear to be running an X server; please exit X before installing. For further details, please see the section INSTALLING THE NVIDIA DRIVER in the README available on the Linux driver download page at


This is a common error when installing the graphics driver on Linux. You just need to exit X before you install the driver.

This can be done on Ubuntu with this command:

$ sudo service lightdm stop

Another way to safely update the driver is to do:

$ sudo init 3
$ Uninstall old driver
$ Install new driver
$ sudo init 5

Tried with: Ubuntu 14.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧