Nano alternative for windows powershell

I am looking for software similar to nano for linux bash but for windows powershell. Is there any built in so I do not have to install something?

EDIT Nano is a text editor that runs within the bash. You can open a text like document (.txt, .c etc) in the bash to edit it on the fly or just view it and close it again.


Just install Windows Subsystem for Linux (WSL). Then, type.

wsl nano

or

wsl nano textfilenametoedit.txt

Quotes are not needed.


Nano is available for powershell. If you have the Chocolatey package manager installed in your system you can install nano with:

choco install nano

You can install Chocolatey through the command line with:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

My personal experience is that it nano performs great in Windows 10 but it's really slow to start up the first time in Windows 7.


There is now a way to use nano and vim with powershell by installing "Bash on Windows". More information on Scott Hanselman blog

From command line you can run

bash -c "vi filename.txt"
bash -c "nano filename.txt"

you can also add those functions to your powershell profile

function vi ($File){
    bash -c "vi $File"
}

function nano ($File){
    bash -c "nano $File"
}

The blog source where I got the information from


The only built-in editor in Windows is Notepad. It should already be in your path, so you can just type notepad something.txt in the PowerShell console.

If you want console-based editors, there are some here: https://stackoverflow.com/questions/11045077/edit-a-text-file-on-the-console-in-64-bit-windows

A useful thing to do is to make an alias called "edit" (for example) for your favorite text editor. Put something like this in your profile:

set-alias edit "${env:ProgramFiles}\Sublime Text 3\sublime_text.exe"