Skip to content

Instantly share code, notes, and snippets.

@henriquecarv
Last active March 8, 2021 07:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henriquecarv/b22cb8c714b5d641b63da335724da2f7 to your computer and use it in GitHub Desktop.
Save henriquecarv/b22cb8c714b5d641b63da335724da2f7 to your computer and use it in GitHub Desktop.
Ubuntu 18.04 - Development environment setup (NodeJS, VirtualBox, Docker, Git, Slack, Skype, VSCode, Vim, Chromium, Chrome, .NET Core SDK)
#!/bin/bash
LIST_OF_APPS="ubuntu-restricted-extras synaptic gnome-shell-extensions chrome-gnome-shell playonlinux curl gparted neovim mysql-workbench vim gedit p7zip-full p7zip-rar shutter libfreerdp-plugins-standard chromium-browser libnss3-tools vlc firefox libpng-dev net-tools apt-transport-https ca-certificates software-properties-common"
# Update app repository, upgrade installed application
sudo apt update && sudo apt upgrade -y
# ttf-mscorefonts-installer
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt install ttf-mscorefonts-installer -y
# NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.profile
sudo chown -R $USER:$(id -gn $USER) /home/$USER/.nvm
# Yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install --no-install-recommends yarn -y
echo "export PATH=\"$PATH:/opt/yarn-[version]/bin\"" >> ~/.profile
echo "export PATH=\"$PATH:`yarn global bin`\"" >> ~/.profile
source ~/.profile
# Java
sudo apt update && sudo apt upgrade -y
sudo apt install default-jre default-jdk -y
# DBeaver
wget -O - https://dbeaver.io/debs/dbeaver.gpg.key | sudo apt-key add -
echo "deb https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list
sudo apt update
sudo apt install dbeaver-ce -y
# VirtualBox
#sudo apt update && sudo apt install virtualbox dkms -y
# Install list of apps
sudo apt install $LIST_OF_APPS -y
# Docker
sudo apt install docker.io -y
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
# Git Setup
#sudo apt-add-repository ppa:git-core/ppa
sudo apt install git meld kdiff3 libgnome-keyring-dev -y
git config --global core.editor nvim
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
git config --global push.default matching
git config --global merge.tool meld
git config --global diff.guitool kdiff3
sudo make --directory=/usr/share/doc/git/contrib/credential/gnome-keyring
git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
git config --global push.default current
# create samba credential files
sudo apt install samba -y
sudo touch /etc/samba/cred
sudo sh -c "echo 'username=henriquecarv' >> /etc/samba/cred"
sudo sh -c "echo 'password=samba123' >> /etc/samba/cred"
sudo chmod 0600 /etc/samba/cred
# VPN L2TP Connections
sudo apt update
sudo apt install libreswan network-manager-l2tp network-manager-l2tp-gnome -y
# Spotify
curl -sS https://download.spotify.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt update && sudo apt install spotify-client -y
# Insomnia
echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" | sudo tee -a /etc/apt/sources.list.d/insomnia.list
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc | sudo apt-key add -
sudo apt update
sudo apt install insomnia -y
# VSCode
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code -y
echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.conf > /dev/null
# Postman
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo ln -s /opt/Postman/Postman /usr/bin/postman
# Fix - Visual Studio Code is unable to watch for file changes in this large workspace
echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.conf > /dev/null
# Update Distribution packages
sudo apt update && sudo apt dist-upgrade -y
# Skype
sudo snap install skype --classic
# Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
# Terminator (Terminal)
sudo apt install terminator -y
# NVim permission
sudo chown -R $USER:$(id -gn $USER) /home/$USER/.local/share/nvim
# Enable firewall
sudo ufw enable
# Clean packages
sudo apt auto-remove -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment