Windows Setup

Configure Windows Terminal and PowerShell for Unix Workflows

Tech Setup5 min readUpdated October 20, 2026
TS

Tech Setup

Published September 16, 2026 · Editorial policy

Configure Windows Terminal and PowerShell for Unix Workflows

You use a MacBook for personal projects, but your enterprise client forces you onto a Windows 11 machine. Every time you open the default command prompt, muscle memory betrays you: ls fails, grep is missing, and your SSH keys behave unpredictably across paths. You end up wasting hours fighting path separators and sluggish shell rendering just to run a basic Node.js build.

This guide bridges that gap. You will strip away the Windows command-line legacy, install a modern GPU-accelerated terminal host, configure PowerShell to mirror your favorite Zsh environment, and map standard Unix utilities directly to your path without spinning up a resource-heavy WSL instance.

Quick TL;DR: The Core Stack

If you want the final configuration files right now, here is the exact stack you are building:

  • Terminal Host: Windows Terminal (latest stable via winget)
  • Shell Engine: PowerShell 7+ (cross-platform, object-passing, fast)
  • Prompt Engine: Oh My Posh with the jandedobbeleer/oh-my-posh theme engine
  • Utility Layer: Git for Windows (bundles GNU utilities like grep, sed, awk, and ssh)

Run this administrator-level command block in your current terminal to install the foundation dependencies automatically:

winget install Microsoft.WindowsTerminal
winget install Microsoft.PowerShell
winget install Git.Git

Restart your terminal after installation completes. Verify your PowerShell version by running $PSVersionTable.PSVersion. The major version must read 7 or higher. If it still reads 5.1, you are running Windows PowerShell, which lacks modern cross-platform compatibility features.

Establishing the Unix-Like PATH

Windows hides its core utilities across arbitrary directories, and PowerShell’s native alias system conflicts with standard Unix commands (for instance, curl in PowerShell maps to Invoke-WebRequest, breaking standard curl flags). You need to expose Git's bundled Unix binaries to your global PATH and explicitly remove conflicting PowerShell aliases.

Open your PowerShell profile by running the following command in your terminal:

if (!(Test-Path -Path $PROFILE)) {
    New-Item -Type File -Path $PROFILE -Force
}
notepad $PROFILE

Paste the following configuration block into your $PROFILE file. This script prepends Git's Unix toolchain to your environment variables and unsets PowerShell cmdlets that shadow standard Unix behavior:

# Prepend Git Unix tools (grep, sed, awk, less, ssh) to the PATH
$GitPath = "C:\Program Files\Git\usr\bin"
if ($env:PATH -notlike "*$GitPath*") {
    $env:PATH = "$GitPath;$env:PATH"
}

# Remove conflicting PowerShell aliases that break Unix muscle memory
Remove-Item Alias:curl -ErrorAction SilentlyContinue
Remove-Item Alias:wget -ErrorAction SilentlyContinue
Remove-Item Alias:ls -ErrorAction SilentlyContinue
Remove-Item Alias:cat -ErrorAction SilentlyContinue

# Map clean Unix-style aliases
function ll { Get-ChildItem -Path . -Force }
function la { Get-ChildItem -Path . -Force }

Save the file and reload your profile by running:

. $PROFILE

Test your configuration by typing which grep or grep --version in your terminal. You should see the binary path resolve to C:\Program Files\Git\usr\bin\grep.exe and print out the GNU grep version details.

Crafting the Windows Terminal Profile

Windows Terminal handles tabs, split panes, and font rendering. By default, it ships with a bloated configuration list. You need to streamline it, set PowerShell 7 as the default shell, and configure a Nerd Font so your prompt icons render correctly without boxes or missing glyphs.

First, download and install a patched developer font. JetBrainsMono Nerd Font is the industry standard for cross-platform consistency. Install it via winget:

winget install JanDeDobbeleer.OhMyPosh
winget install JetBrains.JetBrainsMonoNerdFont

Open the Windows Terminal settings JSON file. You can do this by clicking the drop-down arrow in the title bar of Windows Terminal and selecting Settings, or by pressing Ctrl + Shift + ,.

Replace the contents of your settings.json with the production configuration below. Make sure to swap out the guid placeholders if you are editing an existing file manually, or replace the entire object if you are setting it up fresh:

{
    "$schema": "https://aka.ms/terminal-profiles-schema.json",
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "profiles": {
        "defaults": {
            "font": {
                "face": "JetBrainsMono Nerd Font",
                "size": 11
            },
            "colorScheme": "Campbell Powershell",
            "cursorShape": "bar",
            "useAcrylic": false,
            "acrylicOpacity": 0.85
        },
        "list": [
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell 7",
                "source": "Windows.Terminal.PowershellCore",
                "startingDirectory": "%USERPROFILE%"
            },
            {
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": true,
                "name": "Cmd"
            }
        ],
        "schemes": []
    },
    "actions": [
        { "command": { "action": "splitPane", "split": "auto" }, "keys": "alt+shift+d" }
    ]
}

Save the JSON file. Windows Terminal applies modifications immediately without requiring a restart.

Configuring the Prompt and Syntax Highlighting

A Unix workflow relies heavily on visual feedback: git branch status, execution time, exit codes, and autosuggestions based on history. You will configure Oh My Posh for the prompt theme, alongside PSReadLine for fish-like autosuggestions and predictive history.

Install the required PowerShell modules by running this command in your terminal:

Install-Module -Name PSReadLine -Scope CurrentUser -Force -AllowClobber
Install-Module -Name Terminal-Icons -Scope CurrentUser -Force

Open your $PROFILE file again (notepad $PROFILE) and append the following module initializations and prompt configurations to the bottom of the file:

# Initialize Oh My Posh Engine with a clean, minimalist theme
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression

# Enable PSReadLine predictive IntelliSense and fish-like history search
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Emacs

# Keybindings for history search (Ctrl+R / Ctrl+S)
Set-PSReadLineKeyHandler -Chord "Ctrl+r" -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Chord "Ctrl+s" -Function HistorySearchForward

# Import Terminal Icons for rich ls output
Import-Module Terminal-Icons

Save the file and run . $PROFILE to load your new environment. Your prompt should instantly transform into a clean, multi-segment line showing your current Git branch, execution duration, and directory context, complete with Emacs-style keybindings and history search.

Troubleshooting Common Breakages

When configuring Windows environments to behave like Unix, specific failure points commonly appear due to execution policies, path spaces, or binary precedence.

Execution Policy Errors

If PowerShell throws an error stating that running scripts is disabled on this system, your execution policy is blocking profile loading. Fix this permanently for your user account by running:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Git Utilities Overriding PowerShell Cmdlets

If running a command like cat throws unexpected syntax errors or behaves differently than expected on Windows, Git's GNU cat binary is colliding with native PowerShell parsing. You can explicitly force PowerShell to execute the native binary or wrap it in your profile:

function cat ($path) {
    & "C:\Program Files\Git\usr\bin\cat.exe" $path
}

Slow Terminal Startup

If your terminal takes more than half a second to spawn a new tab, your Oh My Posh theme or module loading is lagging. Avoid running heavy remote checks inside your prompt renderer. Keep your Oh My Posh theme local, and ensure you are using the compiled JSON theme file distributed with the module rather than parsing remote URLs on every shell start.

Maintaining the Environment

Your shell environment is now decoupled from legacy Windows design patterns. To keep this configuration pristine across machine updates, back up your two core configuration files: your PowerShell profile ($PROFILE, typically located at $HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1) and your Windows Terminal settings (%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json). Store them in a private dotfiles repository, and you can spin up an identical, high-performance Unix-like workspace on any Windows machine with a single winget command block.