AICurious Logo
Published on
Tuesday, February 16, 2021

How do I install Ubuntu on a new machine?

562 words3 min read
Authors

Viet-Anh maintains this note as an instruction to install Ubuntu on a new machine and setup development environment as fast as possible. This note contains my autonomous scripts, and instructions to install necessary packages that I often use.

  • Supported Ubuntu versions: 16.04 -> 20.04. These instructions may work with other versions too.

Install most packages using a script

Below is my script to quickly install my environment with popular packages. You can copy and modify it a little to fit yours. You can save this script as install_ubuntu.sh and use command sh install_ubuntu.sh to install these packages.

#!/bin/sh

# Update the system
sudo apt update && sudo apt full-upgrade

# Basic packages
sudo apt install -y p7zip-full unrar gparted wget build-essential curl git

# Java
sudo apt install -y default-jre

# Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install -y gnome-shell-extensions gnome-shell-extensions

# VS Code
sudo apt update
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install -y code

# Utils
sudo apt install -y nano net-tools sshpass

# Docker
sudo apt-get update
sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    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 update
sudo apt -y install docker-ce docker-ce-cli containerd.io

# 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

# Gimp, VLC
sudo apt install -y gimp vlc

# Skype
wget https://go.skype.com/skypeforlinux-64.deb
sudo dpkg -i skypeforlinux-64.deb
sudo apt install -y -f

# Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

# Config Github
git config --global user.name "Viet Anh Nguyen"
git config --global user.email "[email protected]"

# Fonts
git clone https://github.com/vietanhdev/my-fonts
cd my-fonts && bash install_all_fonts.sh

Setup other packages