Complete guide for setting up PowerShell DevKit on Ubuntu, including WSL (Windows Subsystem for Linux).
PowerShell DevKit supports Ubuntu (and compatible Debian-based distributions) running either natively or inside WSL2. The Linux setup uses apt for system packages and official install scripts for tools not available in the Ubuntu repositories.
!!! note "WSL2 Recommended" If you're on Windows, using WSL2 gives you the best of both worlds: a full Ubuntu environment with access to Windows binaries and the same Windows Terminal you'd configure for the Windows setup.
| Requirement | Details |
|---|---|
| Distribution | Ubuntu 22.04 LTS or later (Debian-based) |
| PowerShell | 7.0+ — installed automatically by bootstrap script below |
| WSL version | WSL2 (if running under Windows) |
| git | sudo apt-get install git |
| curl / unzip | sudo apt-get install curl unzip |
| Internet | Required for downloads |
The bootstrap script handles this for you (see Quick Start below). If you prefer to install manually:
# Microsoft's official one-liner for Ubuntu
curl -fsSL https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb \
-o /tmp/packages-microsoft-prod.deb
sudo dpkg -i /tmp/packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershellThen launch it:
pwshThe bootstrap script is the single entry point for a fresh instance — it installs PowerShell if needed, then runs the full setup:
# 1. Clone the repository (inside WSL / Ubuntu)
git clone https://github.com/Tsabo/PowerShell-DevKit.git
cd PowerShell-DevKit
# 2. Run the bootstrap (handles PowerShell install + full setup)
bash ./Scripts/bootstrap-linux.sh
# — optionally, also make pwsh your default shell in one go —
bash ./Scripts/bootstrap-linux.sh --set-default-shellOnce PowerShell is already installed, you can invoke the setup script directly:
pwsh -File ./Scripts/Setup-Linux.ps1# 3. Validate the installation
./Scripts/Test-Linux.ps1
# 4. Keep everything updated
./Scripts/Update-Linux.ps1Running bash or sh by default is fine, but if you want pwsh to open automatically whenever you launch your WSL / Ubuntu terminal, you have two options:
bash ./Scripts/bootstrap-linux.sh --set-default-shell
# or, if PowerShell is already installed:
./Scripts/Setup-Linux.ps1 -SetDefaultShellThis runs chsh -s $(which pwsh) and registers pwsh in /etc/shells for you.
# Register pwsh as a valid login shell (if not already listed)
echo "$(which pwsh)" | sudo tee -a /etc/shells
# Set it as your default shell
chsh -s $(which pwsh)Open a new terminal session for the change to take effect.
If you use Windows Terminal, you can also configure the Ubuntu profile to start pwsh directly without changing your login shell:
- Open Windows Terminal → Settings → Profiles → Ubuntu
- Under Command line, set:
pwsh - Save. New Ubuntu tab sessions will open straight into PowerShell.
| Component | Source | Notes |
|---|---|---|
| oh-my-posh | Official install script | Placed in ~/.local/bin |
| fzf | apt | sudo apt-get install fzf |
| zoxide | Official install script | Placed in ~/.local/bin |
| glow | charm.sh apt repo | Adds /etc/apt/sources.list.d/charm.list |
| yazi | GitHub releases | Placed in ~/.local/bin |
| ya | GitHub releases | Yazi package manager (bundled with yazi) |
| PSFzf | PSGallery | Current user scope |
| Terminal-Icons | PSGallery | Current user scope |
| F7History | PSGallery | Current user scope |
| posh-git | PSGallery | Current user scope |
| PowerColorLS | PSGallery | Optional |
| Yazi optional deps | apt | ffmpeg, 7zip, jq, poppler-utils, fd-find, ripgrep, imagemagick |
| Yazi config | Git | Cloned to ~/.config/yazi |
| Yazi plugins | ya pkg | git, githead, flexoki-light, vscode-dark-plus |
| Component | Reason |
|---|---|
| CascadiaCode Font | Fonts live on the Windows side in WSL; no display server in headless Linux |
| Microsoft Edit | Windows-only binary |
| gsudo | Use sudo instead |
| Scoop / resvg | Windows-only package manager |
| Windows Terminal | Windows-side configuration |
WSL runs inside Windows Terminal, so fonts are configured on the Windows side. The CaskaydiaCove Nerd Font must be installed on Windows for icons to display correctly.
Option A — Run the Windows setup first (recommended):
# On Windows (PowerShell), from the same repo:
.\Scripts\Setup.ps1This installs the font automatically.
Option B — Install manually on Windows:
# On Windows PowerShell
oh-my-posh font install CascadiaCodeThen configure Windows Terminal:
- Open Windows Terminal → Settings → Profiles → Defaults → Appearance
- Set Font face to
CaskaydiaCove Nerd Font Mono - Restart Windows Terminal
| Configuration | Path |
|---|---|
| PowerShell Profile | ~/.config/powershell/Microsoft.PowerShell_profile.ps1 |
| oh-my-posh Themes | ~/.config/powershell/Posh/ |
| Yazi Config | ~/.config/yazi/ |
| Binaries | ~/.local/bin/ |
!!! tip "~/.local/bin on PATH"
The setup script adds ~/.local/bin to the current session's $env:PATH. To make this permanent in bash/zsh, add the following to ~/.bashrc or ~/.zshrc:
bash export PATH="$HOME/.local/bin:$PATH"
# Inside pwsh:
./Scripts/Update-Linux.ps1
# Update only apt packages and binaries
./Scripts/Update-Linux.ps1 -AptOnly
# Update only PowerShell modules
./Scripts/Update-Linux.ps1 -ModulesOnly
# Update only Yazi plugins and config
./Scripts/Update-Linux.ps1 -YaziOnlyThis is always a font issue in WSL.
- Ensure the CaskaydiaCove Nerd Font is installed on Windows (see Fonts in WSL above).
- In Windows Terminal: Settings → Profiles → Defaults → Appearance → Font face =
CaskaydiaCove Nerd Font Mono. - Restart Windows Terminal.
The binaries are installed to ~/.local/bin. If that directory isn't on your shell's PATH, they won't be found.
# Check if ~/.local/bin is on PATH
echo $PATH | grep -o "$HOME/.local/bin"
# Add it if missing (bash)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrcThe PowerShell profile auto-adds the path for pwsh sessions, but your login shell (bash/zsh) needs it too if you launch pwsh interactively.
The setup script uses sudo for system-level operations. If sudo isn't configured:
# Check sudo access
sudo -v
# If not in sudo group:
su -c "usermod -aG sudo $USER"
# Then log out and back inInstall the optional dependencies:
sudo apt-get install ffmpeg p7zip-full jq poppler-utils fd-find ripgrep imagemagickOr re-run the setup:
./Scripts/Setup-Linux.ps1Configure apt proxy settings:
# /etc/apt/apt.conf.d/99proxy
Acquire::http::Proxy "http://your-proxy:port/";
Acquire::https::Proxy "http://your-proxy:port/";# Reset WSL network adapter (run in PowerShell on Windows)
netsh winsock reset
# Then restart WSL
wsl --shutdown| Feature | Windows | macOS | Linux / WSL |
|---|---|---|---|
| Package manager | winget | Homebrew | apt + install scripts |
| Font installation | oh-my-posh font install | brew cask | On Windows side |
| Terminal deployment | ✅ Auto | N/A | N/A (use Windows Terminal |
| gsudo | ✅ Optional | ❌ | ❌ (use sudo) |
| Scoop / resvg | ✅ Optional | ❌ | ❌ |
| Microsoft Edit | ✅ | ✅ (brew) | ❌ |
| Default shell change | N/A | ✅ (chsh) | Optional (chsh) |
| Profile path | $PROFILE (Documents) |
~/.config/powershell/ |
~/.config/powershell/ |