HomeToolsAbout a20k

EC2

Ubuntu Setup

Enter the Root mode

sudo -s

Get the latest software

sudo apt-get update

Check installation of GNU screen

screen --version
  • check gnu-screen section for more info on how to use screen

Set zsh as default shell

Install zsh

sudo apt install zsh

Set password on Ubuntu

sudo passwd ubuntu

Configure to always run shell in zsh (alternatively, omz will ask)

chsh -s "$(which zsh)"
  • chsh
    • chang your login shell

Setup omz

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

Setup Git

Install Git

apt-get install git

Install GH

type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ && sudo apt update \ && sudo apt install gh -y

Authentication

Generate Git personal credential

  • Do this for the repo you want to pull code from

Permission Errors in Ubuntu

Check who you are in the terminal

whoami

Grant permission on directory

sudo chown -R $(whoami) .git/

When not logged in to Git locally, login

gh auth login

Trigger required permission through manual device authentication

gh auth refresh -h github.com -s admin:public_key

Trigger manual device authentication

© VincentVanKoh