Skip to content

Instantly share code, notes, and snippets.

@duboiss
Last active August 29, 2021 16:35
Show Gist options
  • Save duboiss/682496e57fa8c26547e1df2f861ba026 to your computer and use it in GitHub Desktop.
Save duboiss/682496e57fa8c26547e1df2f861ba026 to your computer and use it in GitHub Desktop.

Update packages

sudo apt update && sudo apt upgrade -y

Update to latest Ubuntu version

sudo nano /etc/update-manager/release-upgrades

Change lts to normal. Reboot WSL with wsl --shutdown in powershell/cmd.

sudo do-release-upgrade

Answer yes to each question, Ubuntu will restart by itself. You can now check your version with lsb_release -a.

Optional

Remove Windows path and disable swap

https://docs.microsoft.com/fr-fr/windows/wsl/wsl-config

sudo nano /etc/wsl.conf

[interop] 
enabled=false # enable launch of Windows binaries; default is true 
appendWindowsPath=false # append Windows path to $PATH variable; default is true

[wsl2]
swap=0

In Powershell: wsl --shutdown.

Install ZSH & oh-my-zsh

sudo apt install zsh -y && chsh -s $(which zsh)
zsh
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -r ~/.zshrc && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.zshrc

sudo apt-get install build-essential -y
brew install gcc

Homebrew packages

Put you Brewfile in home or specific folder and run brew bundle.

After you can rm Brewfile.lock.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment