Skip to content

Instantly share code, notes, and snippets.

@rohsyl
Created September 10, 2019 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohsyl/ebd5bdba72c98dbaa005d6c4b517db19 to your computer and use it in GitHub Desktop.
Save rohsyl/ebd5bdba72c98dbaa005d6c4b517db19 to your computer and use it in GitHub Desktop.
Ubuntu 18.04 NVIDIA Driver
#!/bin/bash
# This script allow you to install the drivier for your Nvidia GPU.
# Run as administrator
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
if [ $1 ] then
url = $1
else
url = http://fr.download.nvidia.com/XFree86/Linux-x86_64/435.21/NVIDIA-Linux-x86_64-435.21.run
fi
apt purge nvidia* && apt autoremove
filename="NVIDIA_driver.run"
# Get the last version of your driver here https://www.nvidia.com/Download/index.aspx and download it
wget -O $filename $url
# Add execution permission
chmod u+x $filename
# Launch the installation
./$filename
# And reboot
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment