Skip to content

Instantly share code, notes, and snippets.

@RalfG
Last active December 20, 2025 02:33
Show Gist options
  • Select an option

  • Save RalfG/19dfb8b51dd681abbae22af966c57ced to your computer and use it in GitHub Desktop.

Select an option

Save RalfG/19dfb8b51dd681abbae22af966c57ced to your computer and use it in GitHub Desktop.
Awesome Linux shell on Windows: WSL, Windows Terminal, ZSH, oh-my-zsh, and powerlevel10k

Awesome Linux shell on Windows: WSL, Windows Terminal, ZSH, oh-my-zsh, and powerlevel10k

awesome-linux-windows


Contents


NerdFonts

The shell theme powerlevel10k uses multiple icons (or glyphs) in it's layouts. You need a "patched font" that includes these icons in your terminal. Nerdfonts is a great resource for patched fonts. Go to the download page and download one of fonts of your choice. Once downloaded, install the font in Windows 10. I am pretty fond of Caskaydia Cove, the patched version of Microsofts' new CascadiaCode.


Windows Subsystem for Linux (WSL)

Install WSL following the official Installation Guide. For this guide, we assume you installed the Ubuntu distribution.

WSL_Install_Ubuntu


Windows Terminal

Windows Terminal is the new terminal in Windows 10 and is to replace the old conhost.exe. This new terminal is modern, highly customizable, and opens Command Prompt, PowerShell and WSL. Install Windows Terminal from the Microsoft Store.

In the dropdown menu, next to the + sign, click Settings. This opens a JSON file with your personal configuration settings. Here you can customize the following:

  • Set Ubuntu to be the default profile. When you start Terminal, we can set the default profile to Ubuntu, instead of PowerShell or Command Prompt. In the profiles list, there should be an entry with "name": "Ubuntu". Copy the "guid" value from this profile to the defaultProfile value near the top of the file.
  • Customize the Terminal look for each profile, or in general. Here you should also set your previously downloaded Nerd Font as the fontFace. Here is my configuration for the Ubuntu profile:
    {
      "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
      "hidden": false,
      "name": "Ubuntu",
      "source": "Windows.Terminal.Wsl",
      "startingDirectory" : ".",
      "colorScheme": "One Half Dark",
      "cursorColor": "#ffffff",
      "fontFace": "CaskaydiaCove NF",
      "fontSize": 12,
      "useAcrylic": true,
      "acrylicOpacity": 0.7,
      "tabTitle": "Ubuntu",
      "suppressApplicationTitle": true,
      "padding": "16, 16, 16, 16"
    }

ZSH

ZSH, or Z shell, is an extended version of the Bourne Shell that allows us to install plugins and customizable themes, such as Powerlevel10k. In Ubuntu, install ZSH with apt:

sudo apt-get install zsh

Set ZSH to be the default shell in WSL/Ubuntu by editing ~/.bashrc: Run nano ~/.bashrc and adding the following lines to the top of the file:

if [ -t 1 ]; then
exec zsh
fi

Save and exit nano with CTRL-X, typing y, and ENTER.


Oh-my-zsh

Oh-my-zsh is a plugin manager for ZSH. Install it with

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Then download plugins and themes:

  • Auto suggestions:
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  • Syntax highlighting:
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • Powerlevel10k theme:
    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Edit the following lines in your ZSH settings (nano ~/.zshrc) to activate the plugins and theme:

  • ZSH_THEME="powerlevel10k/powerlevel10k"
  • plugins=(zsh-autosuggestions zsh-syntax-highlighting git)

Powerlevel10k

Run the Powerlevel10k theme configuration by "re-sourceing" your shell:

source ~/.zshrc

First, the configuration wizard will verify whether you are using a fully compatible font, then it will go through several configuration options. I chose the following settings:

  • Prompt Style: Lean
  • Character Set: Unicode
  • Prompt Colors: 8 colors
  • Show current time: 24-hour format
  • Prompt Height: Two lines
  • Prompt Connection: Disconnected
  • Prompt Frame: No frame
  • Prompt Spacing: Sparse
  • Icons: Few icons
  • Prompt Flow: Concise
  • Enable Transient Prompt: Yes
  • Instant Prompt Mode: Quiet

The generated ~/.p10k.zsh file can be further customized to your likings. For intance, I moved the context field from the left to the right hand side of the prompt. Later on, the configuration wizard can be run again with the command p10k configure.

And that's it. You now have an awesome Linux terminal on Windows 10!

@moin1777
Copy link

Thanks for this brother, it helps me a lot

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