Ubuntu 21.10 installation with a bunch of programs

thiagobraga

Thiago Braga

Posted on April 22, 2022

Ubuntu 21.10 installation with a bunch of programs

Hi, guys. How are you?

In this post I'll share the script I've been writing down during my most recent installation of Ubuntu 21.10, so I can reuse it on another computer.

It's divided into the following sections:

Note: This script is constantly changing. Follow the Ubuntu 21.10 Installation gist for the most current version, in case the text below is out of date.

Initial tasks

Use sudo without password

# TODO: Check if entry already exists in sudoers file
Enter fullscreen mode Exit fullscreen mode
# It'll ask for password only once
echo "${USER} ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
Enter fullscreen mode Exit fullscreen mode

Update installed programs

sudo apt update
sudo apt upgrade -yV
sudo apt autoremove -yV
sudo apt autoclean
Enter fullscreen mode Exit fullscreen mode

Make Ubuntu use local time for hardware clock

It avoids conflicts with Windows clock in dual-boot setups.

timedatectl set-local-rtc 1
Enter fullscreen mode Exit fullscreen mode

Install essential software

sudo apt install -y \
  apt-transport-https \
  bash \
  bat \
  chrome-gnome-shell \
  clang \
  cmake \
  curl \
  dconf-editor \
  dosfstools \
  findutils \
  gawk \
  git \
  gnome-shell-extension-prefs \
  gnome-tweaks \
  gpick \
  grep \
  grub-common \
  grub-pc-bin \
  htop \
  jq \
  libcurl4-openssl-dev \
  libffi-dev \
  libpython3-dev \
  libreadline-dev \
  libssl-dev \
  libtool-bin \
  libwim15 \
  libwxbase3.0-0v5 \
  libwxgtk3.0-gtk3-0v5 \
  libxslt1-dev \
  libxt-dev \
  libyaml-dev \
  make \
  ntfs-3g \
  p7zip \
  p7zip-full \
  parted \
  python3-wxgtk4.0 \
  qt5ct \
  samba \
  tmux \
  ubuntu-restricted-extras \
  unrar \
  util-linux \
  vim \
  wget \
  wimtools \
  xclip \
  zlib1g-dev \
  zsh
Enter fullscreen mode Exit fullscreen mode

Tasks to do after install

Make zsh default shell to user and root

sudo chsh -s $(which zsh) ${USER}
sudo chsh -s $(which zsh) root
Enter fullscreen mode Exit fullscreen mode

Add samba user

sudo smbpasswd -a ${USER}
Enter fullscreen mode Exit fullscreen mode

Development

PHP

PHP 7.4

sudo add-apt-repository -y ppa:ondrej/php
sudo sed -i 's/impish/focal/' /etc/apt/sources.list.d/ondrej-ubuntu-php-impish.list
sudo apt update
sudo apt install -y php7.4-{cli,curl,fpm,mcrypt,xdebug,xml,zip}
Enter fullscreen mode Exit fullscreen mode

Composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer                            
Enter fullscreen mode Exit fullscreen mode

PHP CodeSniffer (phpcs)

composer global require squizlabs/php_codesniffer=3.6.0
Enter fullscreen mode Exit fullscreen mode

Python

Python 3

sudo apt install -y python-is-python3 python3-pip
Enter fullscreen mode Exit fullscreen mode

Ruby

Ruby 2.7.1

sudo apt install -y rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc
rbenv install 2.7.1
rbenv global 2.7.1
Enter fullscreen mode Exit fullscreen mode

Gollum (Gitlab Wiki)

gem install gollum
Enter fullscreen mode Exit fullscreen mode

IDE

Sublime Text

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install -y sublime-text
Enter fullscreen mode Exit fullscreen mode

VS Code

sudo apt install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt update
sudo apt install -y code
Enter fullscreen mode Exit fullscreen mode

DBMS

DBeaver

sudo add-apt-repository -y ppa:serge-rider/dbeaver-ce
sudo apt install -y dbeaver-ce
Enter fullscreen mode Exit fullscreen mode

MySQL Workbench

sudo apt install -y mysql-workbench
Enter fullscreen mode Exit fullscreen mode

DevOps tools

Docker

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
rm -f get-docker.sh
Enter fullscreen mode Exit fullscreen mode

Docker Compose

I'm still using v1.29.2 because of incompatibilities with BuildKit in some projects I work.

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

Ansible

sudo apt install -y ansible
Enter fullscreen mode Exit fullscreen mode

Terraform

sudo apt install -y terraform
Enter fullscreen mode Exit fullscreen mode

Kool

curl -fsSL https://kool.dev/install | BIN_PATH=~/.local/bin/kool bash
Enter fullscreen mode Exit fullscreen mode

Heroku

curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
Enter fullscreen mode Exit fullscreen mode

Minikube

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
Enter fullscreen mode Exit fullscreen mode

RestAPIs

Postman

curl -Lo postman-linux-x64.tar.gz https://dl.pstmn.io/download/latest/linux64
tar zxvf postman-linux-x64.tar.gz
rm -f postman-linux-x64.tar.gz
sudo mv Postman /opt
sudo ln -sf /opt/Postman/Postman /usr/local/bin/postman
sudo ln -sf /opt/Postman/Postman /usr/bin/postman
Enter fullscreen mode Exit fullscreen mode

Browsers

Brave

sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave.list
sudo apt update
sudo apt install -y brave-browser
Enter fullscreen mode Exit fullscreen mode

Chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
rm -f google-chrome-stable_current_amd64.deb
Enter fullscreen mode Exit fullscreen mode

Firefox

sudo snap remove firefox --purge
sudo apt install -y firefox
Enter fullscreen mode Exit fullscreen mode

Microsoft Edge Dev

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
sudo rm -f microsoft.gpg
sudo apt update
sudo apt install -y microsoft-edge-dev
Enter fullscreen mode Exit fullscreen mode

Other softwares

Balena Etcher

curl -1sLf 'https://dl.cloudsmith.io/public/balena/etcher/setup.deb.sh' | sudo -E bash
sudo apt update
sudo apt install -y balena-etcher-electron
Enter fullscreen mode Exit fullscreen mode

Clementine

sudo apt install -y clementine
Enter fullscreen mode Exit fullscreen mode

Flatpak

sudo apt install -y \
  gnome-software \
  gnome-software-plugin-flatpak \
  flatpak
Enter fullscreen mode Exit fullscreen mode

Gparted

sudo apt install -y gparted
Enter fullscreen mode Exit fullscreen mode

Grub Customizer

sudo apt install -y grub-customizer
Enter fullscreen mode Exit fullscreen mode

Nemo

sudo apt install -y nemo
Enter fullscreen mode Exit fullscreen mode

Numlockx

sudo apt install -y numlockx
Enter fullscreen mode Exit fullscreen mode

Peek

sudo add-apt-repository -y ppa:peek-developers/stable
sudo apt install -y peek
Enter fullscreen mode Exit fullscreen mode

qBitTorrent

sudo add-apt-repository -y ppa:qbittorrent-team/qbittorrent-stable
sudo apt install -y qbittorrent
Enter fullscreen mode Exit fullscreen mode

Remmina

sudo apt-add-repository -y ppa:remmina-ppa-team/remmina-next
sudo apt install -y remmina remmina-plugin-rdp remmina-plugin-secret
Enter fullscreen mode Exit fullscreen mode

SmartGit

# TODO: It is incomplete. Sorry :)
tar xzf <smartgit*.tar.gz>
bin/add-menuitem.sh
Enter fullscreen mode Exit fullscreen mode

Spotify

curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add - 
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt update && sudo apt install -y spotify-client
Enter fullscreen mode Exit fullscreen mode

Steam

curl -0L https://cdn.cloudflare.steamstatic.com/client/installer/steam.deb -o ~/Downloads/steam.deb
sudo dpkg -i ~/Downloads/steam.deb
rm -f ~/Downloads/steam.deb
Enter fullscreen mode Exit fullscreen mode

Terminator

sudo apt install -y terminator
Enter fullscreen mode Exit fullscreen mode

TestDisk

sudo apt install -y testdisk
Enter fullscreen mode Exit fullscreen mode

Tux Guitar

sudo apt install -y tuxguitar \
  tuxguitar-jsa \
  fluid-soundfont-gm \
  fluid-soundfont-gs \
  fluidsynth \
  timidity
Enter fullscreen mode Exit fullscreen mode

Typora

wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
sudo add-apt-repository -y 'deb https://typora.io/linux ./'
sudo apt install -y typora
Enter fullscreen mode Exit fullscreen mode

WoeUSB

sudo add-apt-repository -y ppa:tomtomtom/woeusb
sudo apt install -y woeusb-frontend-wxgtk
Enter fullscreen mode Exit fullscreen mode

Zoom

wget https://zoom.us/client/latest/zoom_amd64.deb -O zoom.deb
sudo apt install -y ./zoom.deb
rm -f zoom.deb
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
thiagobraga
Thiago Braga

Posted on April 22, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related