ubuntu 16.04 + nvidia

#!/usr/bin/env bash
sudo apt purge "nvidia*"

sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt update && sudo apt -y full-upgrade

sudo apt install -y dkms
sudo apt install -y nvidia-378
sudo echo "blacklist nouveau" > /etc/modprobe.d/disable-nouveau.conf
sudo echo "options nouveau modeset=0" >> /etc/modprobe.d/disable-nouveau.conf

exit 0