3 methods to Install and Configure Nano on Windows

This tutorial explains how you can install the nano text editor on a Windows PC. I will show two different methods.

In the first method, we will use Chocolatey to install nano. If you have not installed Chocolatey, open PowerShell and run the following command to install Chocolatey.

Install Linux Bash on Windows 10 (W...

There are many ways to install Nano PowerShell on windows, the simplest method is:

  1. Open PowerShell as an Administrator.
  2. In PowerShell, execute the following choco install command to install the Nano text editor.
  3. After installing Nano, run the following command to verify the installation was successful and display the current version.

Below I have mentioned the methods you can follow to install nano Powershell.

[Method 1]: Use Chocolatey to install Nano on Windows

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

Step 1: Install Chocolatey using the Powershell command

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'))

Step 2: Install Nano using the Chocolatey command

choco install -y nano

[Method 2]: Use Virtual Machine to install Nano

For the second method, the only prerequisite is that your system has to have Bash (a shell) installed!

If Bash is not yet present on your machine follow these steps:

Step 1. Download an installer for WSL or a virtual machine like the Docker Toolbox for Windows.

Step 2. Install any version of Ubuntu 16.04 LTS

copy all files from [your current working directory]/bash onto /mnt/c/Users/*YOUR_USERNAME*/AppData/.wsl/bin/bash

Step 3. Change the file /mnt/c/Users/*YOUR_USERNAME*/AppData/.wsl/etc/defaults/apparmor from “deny” to “allow”. This allows more open access for WSL and Bash on Windows 10 Home.

Step 4. Open a command prompt and navigate to [your current working directory]/.bash . Type wsl and hit enter:

You have successfully set up an environment where you can easily install nano! Now we want to update nano’s git repository with nano’s master branch. If it is not already installed, type sudo apt update && sudo apt upgrade in the terminal window:

Now nano has been updated to its latest version.

Step 5. Type nano into your terminal window and hit enter to verify that nano is now installed.

Congratulations, you have successfully installed nano on Windows!

[Method 3]: Installing Nano on windows through Zip file

If you’re using Windows, you can download nano from nano-editor.org/download.php

Step 1: Download the zip file from nano-editor.org and upload the .gz file on your desktop.

download and unzip nano installer - 3 methods to Install and Configure Nano on Windows

Step 2: Copy the nano.exe file to your Windows folder. This will let you run the nano directly from the command prompt.

If you are not comfortable with copying a .exe in your Windows folder, you can set the path of Nano in an environment variable.

Add Nano to the environment path

Step 1: Copy the path to the nano.exe

copy the path to nano exe file - 3 methods to Install and Configure Nano on Windows

Step 2: Open Settings >> Environment Variable

Edit environment variable for your account - 3 methods to Install and Configure Nano on Windows

Step 3: Click on “Environment Variable” Button

click environment variable from settings - 3 methods to Install and Configure Nano on Windows

Step 4: Add a new entry to the Environment

Create new and add the path to the - 3 methods to Install and Configure Nano on Windows

Step 3: Open the command prompt and run Nano to confirm the installation