Skip to content

Instantly share code, notes, and snippets.

@cjonstrup
Last active June 1, 2022 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjonstrup/3e2114f567e4200b3df6129bca9832f8 to your computer and use it in GitHub Desktop.
Save cjonstrup/3e2114f567e4200b3df6129bca9832f8 to your computer and use it in GitHub Desktop.
Ubuntu 22

Ubuntu 22 setup

Overview

Look at one of the following topics to learn more

Common

Basic packages to install

Ssh

ssh-keygen -t ed25519 -C "comment"

PHP

sudo apt -y install php8.1-cli

Tools

sudo apt -y install sysstat htop zsh apt tig git vim curl unzip p7zip unrar composer npm nodejs

Zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install --lts

Docker

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo apt -y install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Docker GUI

sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc

Reload zsh profile

source ~/.zshrc

Dev tool setup

sudo npm install -g gitlab-ci-local

Optional

Fuse

sudo add-apt-repository universe
sudo apt -y install libfuse2

.NET

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

sudo apt-get update; \
  sudo apt-get -y install apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get -y install dotnet-sdk-6.0 aspnetcore-runtime-6.0

.gitconfig

cat << EOF >> .gitconfigd
[user]
   name = "YOUR NAME"
   email = "YOUR EMAIL"
[push]
   default = simple
[alias]
   ci = commit -a -v
   cv = commit -v
   st = status
   ss = status -s
   br = branch -a -v
   bm = branch --merged
   pr = fetch --prune
   pp = pull --prune
   c = checkout
   b = branch
   m = merge
   mm = merge master
   stat = log --stat
[pull]
   rebase = false
[core]
   editor = vim
EOF 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment