Skip to content

Instantly share code, notes, and snippets.

@thongnguyenhuu
Last active April 16, 2022 04:29
Show Gist options
  • Save thongnguyenhuu/dbda046016cf7528c623c7fe37044a9b to your computer and use it in GitHub Desktop.
Save thongnguyenhuu/dbda046016cf7528c623c7fe37044a9b to your computer and use it in GitHub Desktop.
Setup ubuntu with one command
sudo apt update
# Install zsh if not existed
if ! which zsh > /dev/null
then
echo "===> INSTALL zsh"
sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo 'exec zsh' >> ~/.bashrc
fi
# Install Homebrew if not existed
if ! which brew > /dev/null
then
echo "===> INSTALL Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
# Install git
sudo apt install git
# Install VS Code
snap install code --classic
# Install net tool
# http://geekstuff.org/2018/06/09/ifconfig-missing-in-ubuntu-18-04/
sudo apt install net-tools
# Open SSH
# https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-18-04/
sudo apt install openssh-server -y
# Install unikey
# https://vinasupport.com/huong-dan-cai-bo-go-tieng-viet-ibus-unikey-tren-ubuntu/
sudo apt-get install ibus-unikey
ibus restart
# Install softwares
# Docker
snap install docker
# Manage Docker as a non-root user
# https://docs.docker.com/engine/install/linux-postinstall/
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R
# Skype
snap install skype --classic
# Pycharm profressional
snap install pycharm-professional --classic
# Ripgrep
# https://switowski.com/blog/favorite-cli-tools#ripgrep
snap install ripgrep --classic
# Setup needed tools for Python env
curl https://gist.githubusercontent.com/thongnguyenhuu/f4d7ab4b289baabba861b79a68eaeccb/raw/3ca35939b1913567b9b2704da8a2b1a4ab4a076c/setup_python_ubuntu.sh | bash
sudo apt update
exec zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment