# Linux (incl wsl2)

# Oh My ZSH

## Install ZSH  


sudo apt get install zsh -y

## Install oh my zsh

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

## Install powerlevel10k

#### Manual font installation

1. Download these four ttf files: 
    - [MesloLGS NF Regular.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf)
    - [MesloLGS NF Bold.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf)
    - [MesloLGS NF Italic.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf)
    - [MesloLGS NF Bold Italic.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf)

Select all the four font files, rigtht mouse -&gt; more options -&gt; install for all users

- **Windows Terminal** by Microsoft (the new thing): Open *Settings* (<kbd>Ctrl+,</kbd>), click either on the selected profile under *Profiles* or on *Defaults*, click *Appearance* and set *Font face* to `MesloLGS NF`.

#### Oh My Zsh

1. Clone the repository:
    
    ```
    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
    ```
    
    Users in China can use the official mirror on gitee.com for faster download.  
    中国用户可以使用 gitee.com 上的官方镜像加速下载.
    
    ```
    git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
    ```
2. Set `ZSH_THEME="powerlevel10k/powerlevel10k"` in `~/.zshrc`.

### Configuration wizard

Type `p10k configure` to access the builtin configuration wizard right from your terminal.

<details id="bkmrk-screen-recording-%C2%A0"><summary>Screen recording</summary>

 </details>All styles except [Pure](https://github.com/romkatv/powerlevel10k#pure-compatibility) are functionally equivalent. They display the same information and differ only in presentation.

Configuration wizard creates `~/.p10k.zsh` based on your preferences. Additional prompt customization can be done by editing this file. It has plenty of comments to help you navigate through configuration options.

# wsl2 setup

/etc/wsl.conf

\[boot\]  
systemd=true

sudoers:

\# Allow members of group sudo to execute any command  
\#%sudo ALL=(ALL:ALL) ALL  
%sudo ALL=(ALL) NOPASSWD: ALL