Installing the Nano Text Editor with Chocolatey

Back to Home Page


Before You Begin

This guide assumes you already have Chocolatey installed on your Windows computer. If you haven't installed Chocolatey yet, please follow our Chocolatey Setup Guide first.


What is Nano?

Nano is a simple text editor that works right in your command line. It's much easier to use than other command line editors, because the controls are simple. This is why I am recommending it, since I expect that you are all beginners! Nano should be all you need for this course--it will serve you well.


Installing Nano with Chocolatey

Step 1: Open Terminal (or PowerShell if not on Windows 11) as Administrator

  1. Click on the Windows Start button
  2. Type "Terminal" (or "PowerShell" if not on Windows 11)
  3. Right-click on "Terminal" (or "Windows PowerShell" if not on Windows 11) in the search results
  4. Select "Run as administrator"
  5. Click "Yes" when asked if you want to allow the app to make changes

Step 2: Install Nano

In Terminal (or PowerShell if not on Windows 11), type this command and press Enter:

choco install nano -y

The -y flag automatically answers "yes" to any questions during installation.

Wait for the installation to complete. You'll see a message saying the installation was successful when it's done!

Step 3: Verify the Installation

To make sure Nano installed correctly, type:

nano --version

If you see information about the Nano version, then it installed successfully!


Using Nano

Here's a quick introduction to using Nano:

Creating or Opening a File

To create a new file or open an existing one, type:

nano filename.py

Replace "filename.py" with the name of the file you want to create or edit.

Basic Nano Commands

In Nano, commands use the Ctrl key (shown as ^ in Nano). Here are the most important ones:

These commands are also shown at the bottom of the Nano editor screen for easy reference.


What's Next?

Now that you have Nano installed, you can:


Back to Home Page