HomeAbout

EC2

Ubuntu Setup

# enter root mode sudo -s # cleanup before update sudo apt autoremove -y # get the latest software sudo apt-get update sudo apt dist-upgrade -y # get dependencies also # update ubuntu do-release-upgrade # Check installation of GNU `screen` screen --version # set `zsh` as default shell sudo apt install zsh # configure to always run shell in `zsh` (alternatively, omz will ask) chsh -s "$(which zsh)"

Set password on Ubuntu

sudo passwd ubuntu

Setup CLI

# install omz sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # 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 # generate git personal credential ## https://github.com/settings/tokens #

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

AboutContact