Skip to content

Instantly share code, notes, and snippets.

@hebertcisco
Created November 1, 2020 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hebertcisco/57a03e16a22a2894a191157070429a42 to your computer and use it in GitHub Desktop.
Save hebertcisco/57a03e16a22a2894a191157070429a42 to your computer and use it in GitHub Desktop.
Ubuntu Installation Automation
#!/bin/bash
## By Hebert F. Barros 2019
## Removing any apt ## crashes
sudo rm /var/lib/dpkg/lock-frontend ; sudo rm /var/cache/apt/archives/lock ;
sudo apt-get update
echo 'installing curl'
sudo apt install curl -y
echo 'installing snapd'
sudo apt-get install snapd -y
echo 'installing git'
sudo apt install git -y
echo "What name do you want to use in GIT user.name?"
echo "For example, mine will be \"John Doe\""
read git_config_user_name
git config --global user.name "$git_config_user_name"
clear
echo "What email do you want to use in GIT user.email?"
echo "For example, mine will be \"doe.john@gmail.com\""
read git_config_user_email
git config --global user.email $git_config_user_email
clear
echo "Can I set VIM as your default GIT editor for you? (y/n)"
read git_core_editor_to_vim
if echo "$git_core_editor_to_vim" | grep -iq "^y" ;then
git config --global core.editor vim
else
echo "Okay, no problem. :) Let's move on!"
fi
echo "Generating a SSH Key"
ssh-keygen -t rsa -b 4096 -C $git_config_user_email
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub | xclip -selection clipboard
echo 'enabling workspaces for both screens'
gsettings set org.gnome.mutter workspaces-only-on-primary false
echo 'installing zsh'
sudo apt-get install zsh -y
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
chsh -s /bin/zsh
echo 'installing tool to handle clipboard via CLI'
sudo apt-get install xclip -y
export alias pbcopy='xclip -selection clipboard'
export alias pbpaste='xclip -selection clipboard -o'
source ~/.zshrc
echo 'installing vim'
sudo apt install vim -y
clear
echo 'installing pip'
curl -fsSL http://bit.ly/pip-install-sh | sh
rm -rf get-pip.py
clear
curl -fsSL http://bit.ly/code-sh | sh
echo 'installing extensions'
code --install-extension dbaeumer.vscode-eslint
code --install-extension christian-kohler.path-intellisense
code --install-extension dbaeumer.vscode-eslint
code --install-extension dracula-theme.theme-dracula
code --install-extension esbenp.prettier-vscode
code --install-extension foxundermoon.shell-format
code --install-extension pmneo.tsimporter
code --install-extension waderyan.gitblame
code --install-extension yzhang.markdown-all-in-one
code --install-extension cweijan.cweijan-personal-material-icon-theme
code --install-extension ritwickdey.LiveServer
code --install-extension esbenp.prettier-vscode
code --install-extension ms-python.python
code --install-extension VisualStudioExptTeam.vscodeintellicode
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension xabikos.JavaScriptSnippets
code --install-extension abusaidm.html-snippets
code --install-extension CoenraadS.bracket-pair-colorizer
code --install-extension TabNine.tabnine-vscode
code --install-extension nodesource.vscode-for-node-js-development-pack
code --install-extension jawandarajbir.react-vscode-extension-pack
code --install-extension loiane.ts-extension-pack
code --install-extension ritwickdey.LiveServer
code --install-extension ritwickdey.LiveServer
code --install-extension PKief.material-icon-theme
code --install-extension xabikos.JavaScriptSnippets
code --install-extension CoenraadS.bracket-pair-colorizer
code --install-extension formulahendry.auto-rename-tag
code --install-extension formulahendry.auto-close-tag
code --install-extension Zignd.html-css-class-completion
code --install-extension EditorConfig.EditorConfig
code --install-extension dsznajder.es7-react-js-snippets
code --install-extension naumovs.color-highlight
code --install-extension aaron-bond.better-comments
code --install-extension GitHub.vscode-pull-request-github
code --install-extension waderyan.nodejs-extension-pack
code --install-extension nodesource.vscode-for-node-js-development-pack
echo 'installing spotify'
snap install spotify
echo 'installing android-studio'
sudo snap install android-studio --classic
echo 'installing postman'
sudo snap install postman --classic
echo 'installing beekeeper-studio'
sudo snap install beekeeper-studio --classic
echo 'installing sublime'
sudo snap install sublime-text --classic
echo 'installing insomnia'
sudo snap install insomnia
echo 'installing node'
sudo snap install node --classic
echo 'installing redis'
sudo snap install redis
echo 'installing chrome'
curl -fsSL http://bit.ly/chrome-sh | sh
echo 'installing nvm'
sh -c "$(curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash)"
export NVM_DIR="$HOME/.nvm" && (
git clone https://github.com/creationix/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.zshrc
nvm --version
nvm install 12
nvm alias default 12
node --version
npm --version
echo 'installing Homebrew'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'installing rustup'
curl https://sh.rustup.rs -sSf | sh
echo 'installing deno'
curl -fsSL https://deno.land/x/install/install.sh | sh
echo 'installing autosuggestions'
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
source ~/.zshrc
echo 'installing theme'
sudo apt install fonts-firacode -y
wget -O ~/.oh-my-zsh/themes/node.zsh-theme https://raw.githubusercontent.com/skuridin/oh-my-zsh-node-theme/master/node.zsh-theme
sed -i 's/.*ZSH_THEME=.*/ZSH_THEME="node"/g' ~/.zshrc
echo 'installing meet franz'
wget https://github.com/meetfranz/franz/releases/download/v5.1.0/franz_5.1.0_amd64.deb -O franz.deb
sudo dpkg -i franz.debchristian-kohler.path-intellisense
sudo apt-get install -y -f
echo 'installing slack'
wget https://downloads.slack-edge.com/linux_releases/slack-desktop-3.3.8-amd64.deb
sudo apt install ./slack-desktop-*.deb -y
echo 'installing terminator'
sudo apt-get update
sudo apt-get install terminator -y
echo 'adding dracula theme'
cat <<EOF > ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#ad7fa8"
[keybindings]
close_term = <Primary>w
close_window = <Primary>q
new_tab = <Primary>t
new_window = <Primary>i
paste = <Primary>v
split_horiz = <Primary>e
split_vert = <Primary>d
switch_to_tab_1 = <Primary>1
switch_to_tab_10 = <Primary>0
switch_to_tab_2 = <Primary>2
switch_to_tab_3 = <Primary>3
switch_to_tab_4 = <Primary>4
switch_to_tab_5 = <Primary>5
switch_to_tab_6 = <Primary>6
[layouts]
[[default]]
[[[child1]]]
parent = window0
type = Terminal
[[[window0]]]
parent = ""
type = Window
[plugins]
[profiles]
[[default]]
cursor_color = "#aaaaaa"
EOF
cat <<EOF >> ~/.config/terminator/config
[[Dracula]]
background_color = "#1e1f29"
background_darkness = 0.88
background_type = transparent
copy_on_selection = True
cursor_color = "#bbbbbb"
foreground_color = "#f8f8f2"
palette = "#000000:#ff5555:#50fa7b:#f1fa8c:#bd93f9:#ff79c6:#8be9fd:#bbbbbb:#555555:#ff5555:#50fa7b:#f1fa8c:#bd93f9:#ff79c6:#8be9fd:#ffffff"
scrollback_infinite = True
EOF
echo 'installing docker'
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable docker
docker --version
chmod 777 /var/run/docker.sock
docker run hello-world
echo 'installing docker-compose'
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
echo 'installing aws-cli'
sudo apt-get install awscli -y
aws --version
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb"
sudo dpkg -i session-manager-plugin.deb
session-manager-plugin --version
echo 'installing teamviewer'
wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt install -y ./teamviewer_amd64.deb
echo 'installing vnc-viewer'
sudo apt-get install -y --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
sudo apt-get install vnc4server -y
echo 'installing fzf'
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
echo 'installing dbeaver'
wget -c https://dbeaver.io/files/6.0.0/dbeaver-ce_6.0.0_amd64.deb
sudo dpkg -i dbeaver-ce_6.0.0_amd64.deb
sudo apt-get install -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment