Željko Filipin's blog.
Home Blog Tags Now License

View on GitHub
27 February 2023

Setting up a new Ubuntu machine

by Željko Filipin

I recently wrote about setting up a new macOS machine. This time I’m setting up a new Ubuntu machine, so I’ve decided to move my private notes to a blog post. Setting up macOS and Ubuntu is surprisingly similar, but there is still enough difference that I have separate notes.


Update Ubuntu and check Settings. A few tweaks are usually required.


Ubuntu comes with my favorite browser Firefox already installed. Install the Bitwarden password manager add-on. Sign in to Firefox Account. That installs my favorite Firefox additions:

I prefer that browsers download to Desktop instead of Downloads folder.


Install 1Password password manager that we use at work. It’s available in the Ubuntu Software app.


I mostly follow GitHub’s Generating a new SSH key and adding it to the ssh-agent page.

ssh-keygen -t ed25519 -C "computer-name"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
ssh-add -l

Upload the public key to Gerrit, GitHub and GitLab.

Add Gerrit’s fingerprint to the known_hosts file.

Add Gerrit’s, GitHub’s and GitLab’s fingerprints to the known_hosts file.

ssh -oFingerPrintHash=md5 -p 29418


Install git.

sudo apt install git


I don’t have such a huge investment in my dotfiles repository as some people I know, but I still find that repository very valuable. It makes copying configuration from one machine to another trivial.

mkdir -p ~/Documents/github/zeljkofilipin/
git clone ~/Documents/github/zeljkofilipin/dotfiles

cp ~/Documents/github/zeljkofilipin/dotfiles/.gitconfig ~
cp ~/Documents/github/zeljkofilipin/dotfiles/.mrconfig.ubuntu ~/.mrconfig
cp ~/Documents/github/zeljkofilipin/dotfiles/.ssh/config.ubuntu ~/.ssh/config


I use mr to automatically update more than 90 repositories every day. On a clean machine, the tool will clone all repositories.

sudo apt install git myrepos
mr u

Docker Engine

MediaWiki-Docker and Fresh (the next two sections) need Docker. I’ve tried Docker Desktop on Linux recently. Unfortunately, MediaWiki-Docker doesn’t work with it. Install Docker Engine instead.

sudo apt-get update

sudo apt-get install \
  ca-certificates \
  curl \
  gnupg \

sudo mkdir -m 0755 -p /etc/apt/keyrings

curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

DO NOT (!!!) run the last command from the documentation, because it will cause trouble later.

sudo docker run hello-world

Manage Docker as a non-root user

The first command from the documentation is not needed on Ubuntu.

sudo groupadd docker

sudo usermod -aG docker $USER
newgrp docker


Install MediaWiki-Docker for the local MediaWiki development environment.


Install Fresh for running MediaWiki tests.

Copy the .bashrc file from dotfiles and install the tool.

cp ~/Documents/github/zeljkofilipin/dotfiles/.bashrc ~/.

When the tool is installed, download the container.

fresh-node -env -net

Visual Studio Code

Install Visual Studio Code, start it (to create the settings.json file) and copy the configuration file from dotfiles.

sudo snap install code --classic
cp ~/Documents/github/zeljkofilipin/dotfiles/.config/Code/User/settings.json ~/.config/Code/User/settings.json

Install extensions:


Install Neovim and VSCode Neovim extension.

sudo apt-get install neovim

The above line will install Neovim v0.7. You will get this error message.

The extension requires neovim 0.8 or greater

Install a newer version of Neovim (v0.9).

sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim

For more information see Visual Studio Code + Neovim.


Install other applications:


sudo apt install p7zip


sudo apt-get install ack


sudo snap install chromium


sudo snap install ffmpeg


sudo apt-get install git-review


sudo snap install node --channel=14/stable --classic


sudo apt install ruby ruby-bundler ruby-dev


sudo snap install vlc


I would like to thank Tyler Cipriani for reviewing the article and for advice on how to make it better.

tags: linux