Prerequisites Link to heading
1. Install WSL2 (Ubuntu 20.04) on Windows 10 Link to heading
Open PowerShell or Windows Command Prompt in administrator mode, run the following command and restart your machine.
wsl --install
Reference: https://learn.microsoft.com/en-us/windows/wsl/install
2. Install Windows Terminal Link to heading
- Download and install Windows Terminal from https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-ca&gl=ca
- Launch Windows Terminal and set
Default profile
toUbuntu
3. Install MesloLGS NF font Link to heading
Download and double-click to install all 4 ttf
files:
Reference: https://github.com/romkatv/powerlevel10k#manual-font-installation
Installation Link to heading
1. Intall Zsh and Oh-My-Zsh Link to heading
Open Windows Terminal in Ubuntu profile, run the following command to install Zsh and Oh-My-Zsh.
$ sudo apt-get install zsh
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2. Configure ZSH theme powerlevel10k with Oh-My-Zsh Link to heading
Open the file .zshrc
at your home directory, find the line of ZSH_THEME
and replace with the new theme.
vim ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
Restart your terminal.
When you launch your terminal again, you will find interactive windows that lead you through many powerlevel10k theme options. Select as you like.
4. (Optional) Add some useful aliases Link to heading
Add the following useful aliases to your .zshrc
file
vim ~/.zshrc
alias zshconfig="vim ~/.zshrc"
alias zshconfig="vim ~/.ssh/config"
alias awsconfig="vim ~/.aws/config"
alias gs="git status"
alias gd="git diff"
alias glo="git log --oneline"
alias kc="kubectl"
VS Code terminal integration Link to heading
To use Zsh properly in VS Code terminal:
- Open VS Code
Settings
- Search for
terminal.integrated.fontFamily
- Add the font name
MesloLGS NF