How to install nano on Linux


I personally find the nano text editor the most convenient, here’s how to install nano on Linux (various distributions)

Don’t be put off by everything on this page, you only need to copy and paste one line for your own version!

Debian, Ubuntu, Raspbian, Deepin & Linux Mint

Find and open your terminal (Terminal or Konsole) and enter:

sudo apt update && sudo apt install nano

Test if it worked: Create, Edit & Delete

Manjaro & Arch Linux

Find and open your terminal (maybe Konsole or GNOME Terminal) and enter:

sudo pacman -Syu && sudo pacman -S nano

Test if it worked: Create, Edit & Delete

Fedora, AlmaLinux, Rocky Linux & CentOS 8+

Find and open your terminal (most likely GNOME) and enter:

sudo dnf install nano

Test if it worked: Create, Edit & Delete

OpenSUSE

Find and open your terminal (maybe Konsole or GNOME Terminal) and enter:

sudo zypper refresh && sudo zypper install nano

Test if it worked: Create, Edit & Delete

How to install nano on Linux

Why didn’t you show me how to install nano on Linux for any other versions?

I admit that I’ve skipped a few for the following reasons:

Elementary OS

I didn’t include this because I simply didn’t have enough space in the title! It’s the same command as Debian at the top.

CentOS 7

I didn’t show CentOS 7 because it’s soon going to be no longer supported but you simply have to use the old package manager yum instead of dnf.

CloudLinux

It’s the same as CentOS, for versions up to CloudLinux OS 7 use yum or for CloudLinux OS 8+ use dnf

sudo dnf install nano

Zorin OS

It’s the same command as Debian at the top.

PS Zorin OS is great for beginners and it’s an excellent alternative to elementary OS. Download Zorin OS

Kali Linux

It’s the same command as Debian, if you’re using Kali Linux you should already know this.

Gentoo

If you’re using Gentoo, you shouldn’t need it but here it is:

sudo emerge --sync && sudo emerge nano

Kubuntu, Lubuntu & Xubuntu

It’s the same as Ubuntu of course (at the top of the page)

Do I already have nano?

The chances are that nano is already pre-installed on your system, especially if you use Debian, Ubuntu or any of their deriatives. You can check if it’s installed using this:

nano --version

If you tried installing nano but it was already installed, there’s no harm done, it may have just updated your system.