PAUL'S BLOG

Learn. Build. Share. Repeat.

Installing Ubuntu Server 22.04

2024-08-08 6 min read Tutorial Kubernetes Certification

Kubernetes on your Laptop (3 part series)

This is the second post in my “Kubernetes on your Laptop” series. In this post, I’ll show you how to install Ubuntu Server on a virtual machine using VMware Fusion. If you need help installing VMware Fusion, check out my previous post.

Download Ubuntu Server Image

First thing we need to do is download the Ubuntu Server image based on your machine’s architecture:

Continue reading

Installing .NET on Ubuntu

2023-09-09 1 min read Code Snippets

Installing .NET on Ubuntu is supposed to be easy. Sometimes it’s not. You should be able to follow the instructions on the Microsoft docs and install from a package manager but I’ve had issues with that. It’s been a frustrating experience; the package installs but then I can’t run dotnet --version and I can’t figure out why.

Thankfully there is an option to manually install .NET, this is what I’ve had the most success with.

Continue reading

Ubuntu Dev Tools

2022-11-11 3 min read Code Snippets

Is this the year of the Linux desktop? I’m not sure but I have been making more of an effort to “daily drive” a Linux desktop lately. I’m currently working off of an Ubuntu 22.10 machine and here is my script for installing common tools that I work with daily.

sudo apt-get update 
sudo apt-get upgrade

# add git repository
sudo add-apt-repository ppa:git-core/ppa

# install some basic tools
sudo apt-get update
sudo apt-get install -y \
    python3 \
    python3-pip \
    bpytop \
    tree \
    guvcview \
    vim \
    curl \
    git \
    gnupg2 \
    jq \
    sudo \
    zsh \
    build-essential \
    cmake \
    libssl-dev \
    openssl \
    unzip \
    pkg-config

# install brew tools
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/paul/.zshrc
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/paul/.zshrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install gcc 

# install hugo 
brew install hugo

# install azure cli
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

# install dotnet6
sudo apt-get install dotnet6

# install go
wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.zshrc
rm go1.19.3.linux-amd64.tar.gz 

# install kubectl
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

# install docker desktop
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
wget https://desktop.docker.com/linux/main/amd64/docker-desktop-4.13.1-amd64.deb
sudo apt-get update
sudo apt-get install -y ./docker-desktop-4.13.1-amd64.deb
rm docker-desktop-4.13.1-amd64.deb

# install rancher desktop
curl -s https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb/Release.key | gpg --dearmor | sudo dd status=none of=/usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg] https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb/ ./' | sudo dd status=none of=/etc/apt/sources.list.d/isv-rancher-stable.list
sudo apt-get update
sudo apt-get install -y rancher-desktop

# install hashi tools
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com jammy main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update
sudo apt-get install -y terraform packer consul nomad vault waypoint

# install node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
command -v nvm
nvm install 18

# install pulumi
curl -fsSL https://get.pulumi.com | sh

# install rust and toolchains
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
echo "source $HOME/.cargo/env" >> ~/.zshrc
source "$HOME/.cargo/env"
echo "PATH=$PATH:$HOME/.cargo/bin" >> ~/.zshrc
source ~/.zshrc

# install tools for building wasm apps
rustup install nightly
rustup component add rustfmt
rustup component add rustfmt --toolchain nightly
rustup component add clippy
rustup component add clippy --toolchain nightly
cargo install cargo-expand
cargo install cargo-edit
cargo install cargo-generate
cargo install --git https://github.com/bytecodealliance/wit-bindgen wit-bindgen-cli --tag v0.2.0
rustup target add wasm32-wasi
rustup target add wasm32-unknown-unknown

# install rustwasm
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

# install wasmtime
curl https://wasmtime.dev/install.sh -sSf | bash

# install snaps
sudo snap install --classic code
sudo snap install spotify
sudo snap install postman
sudo snap install zoom-client
sudo snap install sublime-text --classic
sudo snap install storage-explorer
sudo snap install obs-studio
sudo snap install discord
sudo snap install slack --classic
sudo snap install vlc