5

Didn't DOS used to have an "edit" or something? I'm used to nano, like nano, and want to use nano. Does it install on Windows 10?

https://showtop.info/install-nano-text-editor-windows-10-command-prompt/

The download brought me to some spam, and this generally seems like a good way to get a virus. Going to the website for nano:

https://www.nano-editor.org/

I, at least, am not seeing a download link for Windows. I'm using a Surface 3 (regular, not pro) which runs Windows 10, for what it's worth.

Seems that the "download" link to (something) doesn't work:

https://superuser.com/q/200109/55747

5
  • 1
    Yes, I used to use edit in the MicroSoft Disk Operating System Version 3.0 when I first started fiddling around Personal Computers, Twenty-Seven Years Ago. I have not found it myself in the contemporary era. I am using the CygWin Thingy. It is quite cool. In less than a Hundred Giga-Bytes of Data, it has you-name-it. You can play with nano also using its version. I am myself using joe from time to time. But it is quite safe to create an alias for the NotePad++ Editor and start it from the Command-Line with the & Operator. – user1018743 Oct 18 '19 at 21:21
  • 1
  • going off topic, but cygwin has advantages over the linux sub-system? – Thufir Oct 20 '19 at 18:30
  • cygwin is emulated so the performance will be very slow compared to WSL which runs native. – madacoda Apr 29 '20 at 17:11
  • simpler than cgwin is probably to just use emacs – Thufir May 31 '20 at 7:39
10
  1. Install Chocolatey:
powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  1. Run choco install -y nano.
  2. Run nano: nano.
3
3

I highly recommend installing Windows Subsystem for Linux, rather than install individual linux tools in the Windows Command line

Seeing as you are already on Windows 10, this shouldn't be a problem.

See the above link for instructions. But at a high level 1. Enable WSL through a Powershell command 2. Install Debian or Ubuntu from the Microsoft Store 3. Launch Debian/Ubuntu from the Start Menu 4. Run 'sudo apt install nano' if it is not installed by default

If you combine WSL with the new Microsoft Terminal, I think you'll find it works much better than most of the older emulated terminals like Cygwin, Xterm, etc.

But if for some reason you can't install WSL, then Cygwin is the next best thing. It does not have a package repository so you have to select 'nano' during installation as one of the optional components.

2
  • yeah...in this case it's a tablet/tochscreen thing, resource constrained. a microsoft surface 3 with 4gb ram. it pokes along. – Thufir May 27 '20 at 2:01
  • Now 9 months later, I would go for WSL2. I works like a charm. I installed using this article: omgubuntu.co.uk/how-to-install-wsl2-on-windows-10. WSL2 needs at least Windows 10 1903. If you are on an earlier version it can easily be upgraded using Windows Update Assistant before installing WSL2. – HVL71 Feb 26 at 15:51
2

So, this is what I did to use nano via cmd.

You'll find nano.exe in Git\usr\bin (you'll need to have git installed, and you most likely will have). For me, the absolute path is C:\Git\usr\bin. Just add it to Path variable. Then, you'll be able to call nano from anywhere via cmd.

This way you won't have to scour the internet looking for nano.exe.

1

Follow below steps:

  1. download the nano*.exe file from internet
  2. keep it in a nano folder
  3. give the path of this nano.exe file in the env variables (user variables).
  4. Open cmd prompt and type: nano script.sh
  5. command in step 4 will open a nano editor.
2
  • 1
    but where is the nano binary for windows? – Thufir May 27 '20 at 1:59
  • You can find nano binaries for Windows (a.k.a. "NT") at nano-editor.org/dist . You might have to dig around. For instance, you can find windows binaries for version 2.5 at nano-editor.org/dist/v2.5/NT , but there doesn't seem to be one for version 5.0 . – cowlinator Nov 4 '20 at 20:54
-5
  1. Download nano-git-0d9a7347243.exe and rename download to nano.exe, moving it to C:\Windows.
  2. Download Nano zipfile, unzip, and move cygwin1.dll to C:\Windows.
  3. Press Win+R and open cmd and use Nano like in Linux: nano text.txt
3
  • 3
    Moving custom stuff into C:\Windows is a bad idea. It's a system location, leave it alone. Instead add nano's path to %PATH% variable. – gronostaj Jan 10 '20 at 10:03
  • Of course you can use %PATH% variable (it is right way). But the option I proposed is taken from the instruction on the nano website. README.TXT from the 2 paragraph zip: "INSTALL ------- - Copy cygwin1.dll somewhere where Windows will be able to see it (C:\WINNT or C:\WINNT\SYSTEM32 is good for NT users and C:\WINDOWS or C:\WINDOWS\SYSTEM are good for WIn9x users. You can always leave it in the same directory as the nano executable if you're really lazy. - Put the nano.exe executable somehwere useful (your desktop or C:\WINDOWS perhaps) - Have fun with it." – Николай Владимирович Jan 11 '20 at 13:58
  • 3
    Those instructions are written with 20 years old OS in mind. Nowadays they are outdated and should not be followed or recommended. – gronostaj Jan 11 '20 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.