Created
January 2, 2019 10:31
-
-
Save fonylew/03cf6650445aa83782e7de7ba4191fc5 to your computer and use it in GitHub Desktop.
my Ubuntu setup script
This file contains 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 | |
sudo apt update | |
sudo apt upgrade -y | |
# Essential | |
sudo apt install -y git python3-pip gcc cmake | |
# Networking tools | |
sudo apt install -y curl net-tools | |
# Networking tools (optional) | |
sudo apt install -y openssh-server nmap | |
# Utilities | |
sudo apt install -y vim gdebi-core vlc | |
## Nvidia Driver | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt update | |
echo "==================== NVIDIA DRIVER =====================" | |
echo "To install Nvidia Driver -- please determine the version of nvidia driver to use" | |
echo "Using this command : apt search nvidia" | |
echo "For example : " | |
echo "sudo apt install -y nvidia-driver-415" | |
# sudo apt install -y nvidia-driver-415 | |
# CUDA dependencies | |
echo "CUDA Installation" | |
echo "Please visit here https://developer.nvidia.com/cuda-zone" | |
sudo apt-get install -y freeglut3 freeglut3-dev libxi-dev libxmu-dev gcc-6 g++-6 | |
### DEV Tools ### | |
## Node | |
# Using Ubuntu ref: https://github.com/nodesource/distributions/blob/master/README.md | |
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
### Applications ### | |
## GCloud SDK | |
# Create environment variable for correct distribution | |
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" | |
# Add the Cloud SDK distribution URI as a package source | |
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | |
# Import the Google Cloud Platform public key | |
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
# Update the package list and install the Cloud SDK | |
sudo apt-get update && sudo apt-get install -y google-cloud-sdk | |
## Docker | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
# Fix docker permission | |
sudo groupadd docker | |
sudo gpasswd -a $USER docker | |
newgrp docker | |
# Docker compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
## Kubectl | |
sudo apt-get update && sudo apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list | |
sudo apt-get update | |
sudo apt-get install -y kubectl | |
# Rambox | |
sudo snap install rambox | |
# Insomnia | |
sudo snap install insomnia | |
# TeamViewer | |
cd Downloads | |
wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb | |
sudo gdebi teamviewer_amd64.deb | |
### Preferences ### | |
## PyEnv | |
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash | |
## Tilix Terminal | |
sudo apt install -y tilix | |
#ref : https://gnunn1.github.io/tilix-web/manual/vteconfig/ | |
### Theme ### | |
# Fonts | |
sudo apt-get install fonts-powerline | |
## Gtk | |
# Flat-remix | |
sudo add-apt-repository ppa:daniruiz/flat-remix | |
sudo apt-get update | |
sudo apt-get install -y flat-remix-gnome gnome-tweak-tool | |
## Note taking | |
# QOwnNotes | |
sudo add-apt-repository ppa:pbek/qownnotes | |
sudo apt-get update | |
sudo apt-get install -y qownnotes | |
## Shell | |
# zsh | |
sudo apt install -y zsh | |
# oh-my-zsh | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# sudo without password | |
echo "============== Sudo without password ===============" | |
echo "To use sudo with password, please follow this step" | |
echo "1. sudo visudo" | |
echo "2. append this line :" | |
echo "$USER ALL=(ALL) NOPASSWD:ALL" | |
echo "3. save! (depends on which text editor it is; `:wq` for vi and `ctrl+x` for nano) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment