Sunday, September 26, 2021
HomeLinuxHow To Install Latest GNU Nano Text Editor in Linux Desktop

How To Install Latest GNU Nano Text Editor in Linux Desktop

The GNU Nano is shortly known as the Nano text editor. It has been a quick, easy-to-use, and handy tool for both normal and professional usages. No matter if you’re a regular user or a root user, Nano welcomes all for coding and editing scripts. In recent Linux distributions, Nano comes pre-installed with the operating system. But, if you’re using a server or a backdated Linux distribution, you might need to install the GNU Nano on your machine. Using and installing the cross-platform GNU Nano in Linux is easy and hassle-free.

GNU Nano in Linux Desktop


In the beginning, the Nano script editor was initially built with the original GNU project. Though at that time it was used on GNU-based systems, now it has been using on other systems as well. It is built under the GPL license and the C programming language is used to build it. In this post, we will see how to install Latest GNU Nano.

Method 1: Install GNU Nano via CLI


Installing the GNU Nano is easy, straightforward, and hassle-free. Since the Nano tool has been widely used from the beginning of Linux, so no doubt that it is available on the official Linux repository. Here, we will see the CLI methods of installing the GNU Nano tool on Linux through the official package management command. Here, we will use the apt command for Debian/Ubuntu, yum for Fedora and Red Hat, Pacman for Arch, and zypper for SuSE Linux.

Please run the following command given below with root access according to your distribution with root access.

  • Update System repository and Install GNU Nano on Ubuntu/Debian Linux
sudo apt-get update
sudo apt install nano

install nano on Ubuntu Linux

  • Reload the system repository and Install GNU Nano on Fedora/Red Hat Linux
sudo dnf update
sudo yum update
sudo yum install nano

install Nano on Fedora Linux

  • Install GNU Nano on Arch-based Linux
sudo pacman -Syy
sudo pacman -S nano
  • Install GNU Nano on SuSE/openSuSE Linux
sudo zypper refresh
sudo zypper update
sudo zypper install nano

Method 2: Install GNU Nano via Snap


If you’ve been finding ways to install GNU Nano on Linux via Snap, there you go. Please make sure that the Snap daemon is installed on your Linux system. If you don’t have the Snap package on your system, please go through this post to know how to install and get started with Snap on Linux. Finally, you may now run the following Snap command given below to install the GNU Nano in Linux.

sudo snap install nano

When the installation ends up, you can now check the GNU Nano version to ensure that it is installed correctly on your machine.

nano --version

nano --version

Get Started with GNU Nano


Some say that using the Nano text editor is a bit complex. But I would say, It’s not hard, It’s just a bit of tricky. However, here are some common and basic keyboard shortcuts and commands that people mostly look for.

To edit any text/script file from a directory, run the following command given below. Running with a sudo access will allow you to edit at the root level.

sudo nano /home/USERNAME/test.txt

Since the Nano is a keyboard-based text editor, sometimes it’s hard to remember the keyboard commands. In that case, you can enable the mouse pointer on the GNU Nano on Linux.

nano -m /home/USERNAME/test.txt

To know more tips and manuals about the GNU Nano, you can run the following commands given below.

nano –help
man nano

Here are some basic keyboard shortcuts of the GNU Nano tool, hope you find them useful.

  • Use the CTRL + O for savings a file in the current directory.
  • Use the CTRL + X combination key to exit the Nano text editor.
  • Press the CTRL + W keys together to search for something on Nano
  • Use the CTRL + A keys together to go to the beginning of the script/text file.
  • Similarly, use the CTRL + E keys together to go to the end of the file.

Remove Nano from Linux


Removing the GNU Nano tool on Linux systems is simple. All you need is to run the following package management command to the terminal shell with root access. Please use the appropriate command according to Your distribution.

  • Remove Nano Tool From Debian/Ubuntu
sudo apt-get remove nano

remove nano on Linux

  • Uninstall GNU Nano on Fedora/Red Hat System
yum remove -y nano
  • Uninstall GNU Nano on Arch Linux

To remove the GnU Nano tool on an Arch-based Linux system, you can use the GUI-based Pamac package management tool. You will find all the installed tools there. From the installed tools, just select the tool you need to remove, then click on the Remove button and proceed with the root password.

You can also use the following command on your shell to remove Nano from Arch Linux.

sudo pacman -R nano

If you’ve used the Snap method to install the GNU Nano on your Linux system, please run the following command to remove Nano from your system.

sudo snap remove nano

Run the following command on the terminal shell with root access to remove the GNU Nano tool from a SuSE system.

sudo zypper remove nano

Final Words


No fights between Vim and Nano, they both have different levels of users and fans. If you’re used to Vim, there is no harm in trying out the Nano text editor. I personally use the Nano a lot for its availability and universal commands. In the entire post, we have seen how to install the GNU Nano in Linux.

Please share this post with your friends and the Linux community if you find it helpful and handy. You can also write down your opinions regarding this post in the comment section. You can also let us know which other text editors do you prefer to use on a daily basis on your system.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

spot_img

Latest Post

Must Read