All tech notes

Setup Ubuntu 22.04 for Developer

Setup guide to configure Ubuntu 22.04 LTS Desktop for web developers, featuring terminal tuning, editor configs, and docker installation instructions.

Setup Ubuntu 22.04 for Developer

Published May 2, 2022

My Ubuntu 22.04 Desktop Setup

Ubuntu 22.04 LTS Developer Desktop Setup.

I am using Ubuntu 22.04 LTS Gnome edition, which I clean-installed on May 2, 2022, on a ThinkPad X1 Carbon with 16GB RAM. This configuration guides you through setting up a complete development environment on this specific release. You can download the ISO from the official Ubuntu website.

Table of Contents

Update

Update the system packaging lists and packages to their latest versions.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Flatpak

Install Flatpak for package management.

sudo apt-get install flatpak
sudo apt-get install -y gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

See the official documentation for more details.

Homebrew

Install the Homebrew package manager for Linux.

sudo apt-get install build-essential curl file git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the post-installation instructions displayed in your terminal to configure the environment path.

Zsh and Oh My Zsh

Install Zsh and configure Oh My Zsh.

sudo apt-get install -y zsh curl git
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Zsh Auto Suggestions

Set up automatic command suggestions for the shell.

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
nano ~/.zshrc

Add the plugin to your configurations: plugins=(git zsh-autosuggestions).

source ~/.zshrc

For more detailed information, check the repository.

Development Tools

Installing Developer Tools on Ubuntu.

Go

Install Go using Snap or Homebrew.

sudo snap install go --classic
brew install go

Hugo

Install Hugo using Snap or Homebrew.

sudo snap install hugo --channel=extended/stable
brew install hugo

Python 3

Install Python 3 and essential development tools.

sudo apt-get install -y python3-pip
sudo apt-get install -y build-essential libssl-dev libffi-dev python3-dev
sudo apt-get install -y python3-venv

Miniconda

Install Miniconda for Python package management.

chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh

Anaconda

Install Anaconda for scientific Python development.

sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6

Download the installer, run it, and initialize the configuration.

cd ~/Downloads
chmod +x Anaconda3*
./Anaconda3
source ~/anaconda3/bin/activate
conda init zsh
conda deactivate
conda config --set auto_activate_base false

JupyterLab

Install JupyterLab for notebook development.

conda install -c conda-forge jupyterlab
pip install jupyterlab
jupyter-lab

Jupyter Notebook

Install the classic Jupyter Notebook interface.

conda install -c conda-forge notebook
pip install notebook
jupyter notebook

Java

Install the OpenJDK and OpenJRE packages.

sudo apt-get install -y default-jre
sudo apt-get install -y default-jdk

Node Version Manager (NVM)

Install NVM to manage different Node.js versions.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nano ~/.zshrc

Add nvm to the plugins list in your .zshrc: plugins=(git nvm).

source ~/.zshrc

Node.js

Install Node.js version 14 using NVM.

nvm i 14

Yarn

Install the Yarn package manager globally.

npm i -g yarn

pnpm

Install the pnpm package manager globally.

npm i -g pnpm

LAMP Stack

Install Apache, MySQL, and PHP.

sudo apt-get install apache2
sudo ufw allow in "Apache"
sudo ufw allow in "Apache Full"
sudo apt-get install mysql-server
sudo mysql_secure_installation
sudo mysql
exit
sudo apt-get install -y php libapache2-mod-php php-mysql
sudo apt-get install -y openssl php-common php-curl php-json php-mbstring php-mysql php-xml php-zip

Composer

Install Composer for managing PHP dependencies.

sudo apt-get install -y php-cli unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php

Verify and complete the global installation.

HASH=`curl -sS https://composer.github.io/installer.sig`
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
composer

Docker

Install Docker on the system.

sudo snap install docker

Fira Code

Install the Fira Code monospaced font.

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install -y fonts-firacode

Application Software

Here is a list of recommended utilities and software for Ubuntu.

System Administration Utilities

Application NameApplication DescriptionInstall Command
Tweak ToolGraphical interface for advanced GNOME 3 settings.sudo apt-get install gnome-tweak-tool
Dconf EditorViewer and editor of applications' internal settings.sudo apt-get install -y dconf-editor
StacerSystem Optimizer & Monitoring.sudo apt-get install stacer
EvinceDocument viewer.flatpak install flathub org.gnome.Evince
OkularUniversal document viewer.flatpak install flathub org.kde.okular

Design and Media Tools

Application NameApplication DescriptionInstall Command
GIMPPhoto editor.flatpak install flathub org.gimp.GIMP
VLC PlayerMedia Player.flatpak install flathub org.videolan.VLC
InkscapeVector graphics editor.flatpak install flathub org.inkscape.Inkscape
Obs StudioLive streaming and screen recording.flatpak install flathub com.obsproject.Studio
FlameshotScreenshot software.flatpak install flathub org.flameshot.Flameshot
Gravit DesignerVector graphic design app.flatpak install flathub io.designer.GravitDesigner
Xournal++Handwriting notetaking software.flatpak install flathub com.github.xournalpp.xournalpp

Development Applications

Application NameApplication DescriptionInstall Command
Visual Studio CodeCode Editor.flatpak install flathub com.visualstudio.code
Telegram DesktopMessaging Client.flatpak install flathub org.telegram.desktop
qBittorrentTorrent Client.flatpak install flathub org.qbittorrent.qBittorrent
Android StudioOfficial integrated development environment.flatpak install flathub com.google.AndroidStudio
DBeaver CommunitySQL client software.flatpak install flathub io.dbeaver.DBeaverCommunity
PostmanPlatform for API Development.flatpak install flathub com.getpostman.Postman
Draw.ioOnline diagramming website.flatpak install flathub com.jgraph.drawio.desktop
PyCharm CommunityPython IDE.flatpak install flathub com.jetbrains.PyCharm-Community
Beekeeper StudioSQL Editor and Database Manager.sudo snap install beekeeper-studio

Visual Studio Code

A lightweight, powerful code editor.

Free Download Manager (FDM)

A modern, fast download utility.

Ulauncher

An application launcher for GNOME.

Typora

A minimal markdown reader and writer.

wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
sudo add-apt-repository 'deb https://typora.io/linux ./'
sudo apt-get update
sudo apt-get install typora

Themes

Explore GTK and icon themes to personalize the desktop environment.

Grub Theme

Personalize the boot manager screen.

Shell Extensions

Add plugins to customize GNOME shell behavior.

Uninstall

Remove pre-installed applications and games to free up space.

sudo apt-get remove aisleriot gnome-mahjongg gnome-mines gnome-sudoku transmission transmission-common transmission-gtk
sudo apt-get autoremove

Uninstall Miniconda

Remove files and configurations related to Miniconda.

rm -r ~/miniconda3/

Related work

More tech notes