Created
September 10, 2019 05:56
-
-
Save rohsyl/ebd5bdba72c98dbaa005d6c4b517db19 to your computer and use it in GitHub Desktop.
Ubuntu 18.04 NVIDIA Driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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