Windows Command-line Tools
Stay organized with collections
Save and categorize content based on your preferences.
As devs who spend the majority of our time coding on OSX and Linux, we were curious what a modern command-line setup might look like on Windows.
A StackOverflow developer survey reminded us that there are more devs using Windows than any other OS so we were curious if the tooling there was on par with what we were used to in *nix land.
After spending some time evaluating the landscape of Windows CLI tooling, we settled on a set of tools we think gets us 95% of the way there.
At the end of the day, we landed on a combination of:
- PowerShell
- ConEmu
- PSReadLine
- PSGet
- Chocolatey
- Babun (optional)
See below for some more notes on what these different pieces of machinery give you.
- Significantly closer to a real 'shell' than cmd.exe, offering us a powerful scripting environment for task automation. It's fair to compare it to Bash or zsh.
- Autocompletes directory and filenames
- Autocompletes application names
- Has integrated aliases and commands (called cmdlets - e.g
Select-String
is like grep
, Invoke-Elevated
is like sudo
, Sort-Object
is like sort
, Get-Process
lists all active processes). If moving from another shell to PS, Set-Alias
lets you map aliases you're used to to Windows equivalents. For example: Set-Alias server python -m http.server 8000
launches a Python server when the server
alias is used.
- Aliases can be persisted in a PowerShell profile
- Supports piping, like Unix. Unlike Unix, it pipes objects rather than text streams. This requires getting used to but avoids reparsing when you want to get out a property.
- Supports modules. PSGet is a package manager for PowerShell allowing you to easily extend it.
- Optionally consider Posh-Git, a PowerShell script for git to gain contextual tab-completion.
If you're interested in trivia, here's an answer to why MS created PowerShell from the lead architect.

PSReadLine (console editing helpers)
- Significantly improves the console editing experience
- Syntax highlighting whenever you start typing commands. Clearly indicates syntax errors with a red ">" character.
- Highly customizable key bindings
- Bash-style autocompletion
- Bash/zsh interactive history search (Ctrl + R). Powerful command history traversal too. Easily view previous multi-line commands using arrow keys rather than just the last line of the command.
- Proper support for copy/paste/cut (Ctrl+C/X/V should all work just fine)
- Good support for undo/redo
- History saving is automatic

Alternatively, you can use Clink, which has a similar set of features but wasn't strictly written for PowerShell.
ConEmu (console host)
- An advanced console emulator where you can run your shell of choice.
- Supports opening multiple terminals in different tabs. Makes it trivial to launch terminals as different users.
- Extremely customizable - everything from shortcuts to text selection and status bar colors can be changed.
- Supports a split-screen view
- Simple GUI apps can be run in tabs
- Support for Windows 7+ Jump Lists
- Supports smooth window resizing
- Windows font anti-aliasing
- Starting tabs can be fully customized to start in a particular directory
- Intelligent copy/paste

Some folks still enjoy using Console2 and Scott Hanselman has a blog post written about it.
Worth a passing note is Cmder - a console emulation package that combines ConEmu, Clink and msysgit - giving you Git helpers. Cmder basically gives you a prettier experience to ConEmu by default via it's Monokai color scheme.
Cmder also includes some other little benefits, like integration with GUI apps such as Sublime Text.

- Basically homebrew for Windows, allowing you to pull in your favorite Windows apps conveniently. There are currently ~3K packages available that can be updated using Chocolatey directly.
- Differs from Nuget. NuGet is for development libraries. Chocolatey is a binary machine package manager and is built on NuGet infrastructure.
- Offers effectively silent builds
You may also be interested in learning about OneGet, Microsoft's package manager..manager, which should work with Chocolatey under Windows 10.

- Cygwin (the Linux-like env for Windows) minus some of the historically known quirks. The overall setup is significantly more straight-forward using the Babun installer. If you're particularly experienced with Unix and would prefer to avoid learning PowerShell, cygwin/Babun are worth considering.
- Includes a package manager called
pact
(a little similar to brew
) similar to apt-get
. This is a big deal as you currently have to re-run the Cygwin installer when adding packages vs. just using pact.
- Vim pre-installed and pre-configured
- Integrated support for oh-my-zsh
- Auto-updates
Further Reading
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThis guide explores modern command-line tools for Windows, aiming to provide a *nix-like experience for developers.\u003c/p\u003e\n"],["\u003cp\u003eThe recommended setup uses PowerShell as the primary shell, enhanced by ConEmu, PSReadLine, and PSGet.\u003c/p\u003e\n"],["\u003cp\u003eChocolatey acts as a package manager for installing Windows applications, similar to Homebrew on macOS.\u003c/p\u003e\n"],["\u003cp\u003eBabun, a pre-configured Cygwin environment, offers an alternative for developers who prefer a more traditional Unix-like environment.\u003c/p\u003e\n"],["\u003cp\u003eThe guide links to further resources for comparing and customizing Windows command-line experiences.\u003c/p\u003e\n"]]],["The core content outlines a modern command-line setup for Windows, comparable to \\*nix systems. It recommends **PowerShell** as a powerful scripting environment with autocompletion, aliases, and object piping. **PSReadLine** enhances console editing with syntax highlighting and history search. **ConEmu** serves as a customizable console emulator with tabs and split-screen. **Chocolatey** functions as a package manager for Windows applications. Optionally, **Babun**, a preconfigured Cygwin, offers a Unix-like environment with its own package manager. These tools enhance the dev workflow.\n"],null,["# Windows Command-line Tools\n\nAs devs who spend the majority of our time coding on OSX and Linux, we were curious what a modern command-line setup might look like on Windows.\n\nA StackOverflow [developer survey](https://insights.stackoverflow.com/survey/2015) reminded us that there are more devs using Windows than any other OS so we were curious if the tooling there was on par with what we were used to in \\*nix land.\n\nAfter spending some time evaluating the landscape of Windows CLI tooling, we settled on a set of tools we think gets us 95% of the way there.\n\nAt the end of the day, we landed on a combination of:\n\n- PowerShell\n- ConEmu\n- PSReadLine\n- PSGet\n- Chocolatey\n- Babun (optional)\n\nSee below for some more notes on what these different pieces of machinery give you.\n\n[PowerShell](https://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx) (shell)\n------------------------------------------------------------------------------------\n\n- Significantly closer to a real 'shell' than cmd.exe, offering us a powerful scripting environment for task automation. It's fair to compare it to [Bash](http://www.gnu.org/software/bash/) or [zsh](http://www.zsh.org/).\n- Autocompletes directory and filenames\n- Autocompletes application names\n- Has integrated aliases and commands (called cmdlets - e.g `Select-String` is like `grep`, `Invoke-Elevated` is like `sudo`, `Sort-Object` is like `sort`, `Get-Process` lists all active processes). If moving from another shell to PS, `Set-Alias` lets you map aliases you're used to to Windows equivalents. For example: `Set-Alias server python -m http.server 8000` launches a Python server when the `server` alias is used.\n- Aliases can be persisted in a PowerShell profile\n- Supports piping, like Unix. Unlike Unix, it pipes objects rather than text streams. This requires getting used to but avoids reparsing when you want to get out a property.\n- Supports modules. [PSGet](http://psget.net) is a package manager for PowerShell allowing you to easily extend it.\n- Optionally consider [Posh-Git](https://github.com/dahlbyk/posh-git/), a PowerShell script for git to gain contextual tab-completion.\n\nIf you're interested in trivia, here's an answer to why MS created PowerShell from the lead [architect](https://stackoverflow.com/questions/573623/is-powershell-ready-to-replace-my-cygwin-shell-on-windows/573861#573861).\n\n[PSReadLine](https://github.com/lzybkr/PSReadLine) (console editing helpers)\n----------------------------------------------------------------------------\n\n- Significantly improves the console editing experience\n- Syntax highlighting whenever you start typing commands. Clearly indicates syntax errors with a red \"\\\u003e\" character.\n- Highly customizable key bindings\n- Bash-style autocompletion\n- Bash/zsh interactive history search (Ctrl + R). Powerful command history traversal too. Easily view previous multi-line commands using arrow keys rather than just the last line of the command.\n- Proper support for copy/paste/cut (Ctrl+C/X/V should all work just fine)\n- Good support for undo/redo\n- History saving is automatic\n\nAlternatively, you can use [Clink](http://mridgers.github.io/clink/), which has a similar set of features but wasn't strictly written for PowerShell.\n\n[ConEmu](https://conemu.github.io/) (console host)\n--------------------------------------------------\n\n- An advanced console emulator where you can run your shell of choice.\n- Supports opening multiple terminals in different tabs. Makes it trivial to launch terminals as different users.\n- Extremely customizable - everything from shortcuts to text selection and status bar colors can be changed.\n- Supports a split-screen view\n- Simple GUI apps can be run in tabs\n- Support for Windows 7+ Jump Lists\n- Supports smooth window resizing\n- Windows font anti-aliasing\n- Starting tabs can be fully customized to start in a particular directory\n- Intelligent copy/paste\n\n\nSome folks still enjoy using [Console2](https://sourceforge.net/projects/console/) and Scott Hanselman has a blog [post](http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.aspx) written about it.\n\n[Cmder](http://cmder.net/)\n--------------------------\n\nWorth a passing note is Cmder - a console emulation package that combines ConEmu, Clink and msysgit - giving you Git helpers. Cmder basically gives you a prettier experience to ConEmu by default via it's Monokai color scheme.\n\nCmder also includes some other little benefits, like integration with GUI apps such as [Sublime Text](https://laravel.io/forum/02-24-2014-a-neat-way-integrate-cmder-and-sublime-text-seamlessly).\n\n[Chocolatey](https://chocolatey.org) (package manager)\n------------------------------------------------------\n\n- Basically homebrew for Windows, allowing you to pull in your favorite Windows apps conveniently. There are currently \\~3K packages available that can be updated using Chocolatey directly.\n- Differs from [Nuget](https://www.nuget.org). NuGet is for development libraries. Chocolatey is a binary machine package manager and is built on NuGet infrastructure.\n- Offers effectively silent builds\n\nYou may also be interested in learning about [OneGet](http://www.hanselman.com/blog/AptGetForWindowsOneGetAndChocolateyOnWindows10.aspx), Microsoft's package manager..manager, which should work with Chocolatey under Windows 10.\n\n[Babun](http://babun.github.io) (Cygwin preconfigured)\n------------------------------------------------------\n\n- Cygwin (the Linux-like env for Windows) minus some of the historically known quirks. The overall setup is significantly more straight-forward using the Babun installer. If you're particularly experienced with Unix and would prefer to avoid learning PowerShell, cygwin/Babun are worth considering.\n- Includes a package manager called `pact` (a little similar to `brew`) similar to `apt-get`. This is a big deal as you currently have to re-run the Cygwin installer when adding packages vs. just using pact.\n- Vim pre-installed and pre-configured\n- Integrated support for oh-my-zsh\n- Auto-updates\n\nFurther Reading\n---------------\n\n- [Windows command-line experience comparisons](https://aarontgrogg.com/blog/2015/07/31/a-better-windows-command-line-experience-comparing-powercmd-vs-console2-vs-consolez-vs-conemu-vs-cmder/)\n- [Windows editors and shells](https://daverupert.com/2015/10/windows-editors-and-shells/)\n- [Windows command-prompt Redux](http://ventajou.com/windows-command-prompt-redux)\n- [Scott Hanselman's Ultimate Developer and Power Users Tool List for Windows](http://www.hanselman.com/blog/ScottHanselmans2014UltimateDeveloperAndPowerUsersToolListForWindows.aspx)"]]