To enable WSL
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Auto restart LxssManager after system restart: sc config LxssManager start=auto
- To view the distributions currently on the system:
wsl --list
orwsl -l
- To view the available distributions online:
wsl --list --oneline
orwsl -l -o
- To install a distribution:
wsl --install -d <DistributionName>
, for Distribution, use the name fromwsl -l -o
- To see the status of all the distributions and also the running state:
wsl --list --verbose
orwsl -l -v
- To terminate the specified distribution, or stop it from running:
wsl --terminate <DistributionName>
orwsl -t <DistributionName>
- To unregister and uninstall a distribution:
wsl --unregister <DistributionName>
- To immediately terminate all running distribution:
wsl --shutdown
How to setup Zsh & Oh My Zsh
Zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.
Oh My Zsh is a community-driven framework for managing your zsh configuration.
sudo apt install wget
sudo apt install git
sudo apt install zsh
- To install and set zsh as default shell:
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
To install “powerlevel10k” theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
- To update the theme in ~/.zshrc file:
- Open the zsh config file in nano or editor of your choice:
nano ~/.zshrc
and then - Set
ZSH_THEME="powerlevel10k/powerlevel10k"
instead ofZSH_THEME="robbyrussell"
- Open the zsh config file in nano or editor of your choice:
Restart the terminal or exec zsh
, to do the first time setup for the look and feel of the theme. If configuration wizard doesn’t show up run p10k configure
.
References:
- Basic commands in WSL: https://learn.microsoft.com/en-us/windows/wsl/basic-commands
- Learn more on WSL: https://learn.microsoft.com/en-us/windows/wsl/
- Zsh: https://www.zsh.org/
- Oh My Zsh: https://github.com/ohmyzsh/ohmyzsh
- Powerlevel10k theme: https://github.com/romkatv/powerlevel10k