How do I install Ubuntu on a new machine?
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.
1#!/bin/sh
2
3# Update the system
4sudo apt update && sudo apt full-upgrade
5
6# Basic packages
7sudo apt install -y p7zip-full unrar gparted wget build-essential curl git
8
9# Java
10sudo apt install -y default-jre
11
12# Chrome
13wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
14sudo dpkg -i google-chrome-stable_current_amd64.deb
15sudo apt install -y gnome-shell-extensions gnome-shell-extensions
16
17# VS Code
18sudo apt update
19wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
20sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
21sudo apt install -y code
22
23# Utils
24sudo apt install -y nano net-tools sshpass
25
26# Docker
27sudo apt-get update
28sudo apt-get install -y \
29 apt-transport-https \
30 ca-certificates \
31 curl \
32 gnupg-agent \
33 software-properties-common
34curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
35sudo add-apt-repository \
36 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
37 $(lsb_release -cs) \
38 stable"
39sudo apt update
40sudo apt -y install docker-ce docker-ce-cli containerd.io
41
42# Docker-compose
43sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
44sudo chmod +x /usr/local/bin/docker-compose
45
46# Gimp, VLC
47sudo apt install -y gimp vlc
48
49# Skype
50wget https://go.skype.com/skypeforlinux-64.deb
51sudo dpkg -i skypeforlinux-64.deb
52sudo apt install -y -f
53
54# Miniconda
55wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
56bash Miniconda3-latest-Linux-x86_64.sh
57
58# Config Github
59git config --global user.name "Viet Anh Nguyen"
60git config --global user.email "vietanh.dev@gmail.com"
61
62# Fonts
63git clone https://github.com/vietanhdev/my-fonts
64cd my-fonts && bash install_all_fonts.sh
Setup other packages
- Fira Code - my favorite font for VS Code: /posts/generate-and-use-ssh-key-with-github/.
- ZSH - my favorite shell: /posts/zsh-on-ubuntu/.
Related Posts
Install Zsh and Auto suggestion plugin for Ubuntu
ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes.
Read moreInstall OpenCV 4 on macOS using Homebrew
This is my note on how to install OpenCV 4 on macOS with Homebrew. I tested this tutorial on my Macbook Air 2020 with Apple silicon (M1 chip).
Read moreMy development environment on macOS - Macbook Air M1
I maintain this note as my instruction for setting up macOS for development. Currently, I apply this on my Macbook Air M1 2020 - 16GB RAM and 512GB SSD.
Read more