January 29, 2026
Tutorials

How to Install Nano on CentOS 10

How to Install Nano Editor on CentOS 10

Nano is a popular text editor for Linux. It’s a great choice for those new to the system who want something more user-friendly than Vim. Nano is available by default in CentOS 10 repositories. This makes installation fast and reliable. Nano is a must-have tool for Linux administrators, whether you’re managing configuration files, editing Scripts or working remotely.

This guide will show you how to install Nano in CentOS 10. It covers everything from checking if Nano has already been installed, to installing it with DNF, to verifying the installation and giving you basic usage tips.

Table of Content

What Is Nano and Why Use It on CentOS 10?

Nano is a terminal-based, lightweight text editor that’s designed to be simple. Nano is a simple text editor that displays shortcuts at the bottom of your screen.

Why Nano is popular on CentOS 10:

  • Simple for beginners
  • Many Linux systems come preinstalled with the software
  • No complex modes of commands
  • Ideal for quick configuration edits
  • Ideal for SSH and VPS environments

Prerequisites

Before installing Nano on CentOS 10, make sure that:

  • You have root or sudo privileges
  • You have an active internet connection
  • You can use the local terminal or SSH.

Installing packages without problems is possible if you follow these requirements.

How to Install Nano on CentOS 10

Installing Nano is an essential part of command-line editing on CentOS 10. Nano’s intuitive interface, shortcuts built in, and lightweight design make it a great choice for both beginners and experienced administrators.

To install, configure, and use Nano on CentOS 10, follow the steps below:

Step 1: Check If Nano Is Already Installed

It’s worth checking first to see if your CentOS installation includes Nano.

nano –version

nano --version

This command will show the Nano version installed, if it is. You’ll get a message saying “command not located” if you don’t have Nano installed.

Step 2: Update the CentOS 10 Package Index

By updating your system, you will get the most recent version of Nano that is available from the repositories.

sudo dnf update

sudo dnf update

This will update package metadata and install any pending updates. It prevents compatibility or dependency issues.

Step 3: Install Nano on CentOS 10 Using DNF

Installing Nano using the DNF Package Manager is possible.

sudo dnf install nano -y

sudo dnf install nano -y

This command installs Nano along with all required dependencies.

Step 4: Verify Nano Installation

Verify that Nano has been installed correctly.

nano –version

nano --version

The installation is verified, and Nano is now ready for use.

Step 5: Open a File Using Nano

Nano allows you to open or create files directly.

sudo nano filename.txt

sudo nano filename.txt

Nano will open the file for editing if it already exists. Nano creates the file if it does not exist.

Step 6: Understanding Nano Keyboard Shortcuts

Nano has Ctrl shortcuts at the bottom.

Common shortcuts:

  • Ctrl + O – Save file
  • Ctrl + X – Exit editor
  • Ctrl + W – Search text
  • Ctrl + K – Cut line
  • Ctrl + U – Paste line


These shortcuts make Nano beginner-friendly and eliminate the need to memorize complex commands.

Step 7: Edit Configuration Files Safely

CentOS 10 users often use Nano to edit configuration files. Let’s see an example:

sudo nano /etc/ssh/sshd_config

sudo nano /etc/ssh/sshd_config

You can modify system files in a safe manner by using sudo.

Step 8: Enable Syntax Highlighting (Optional)

Nano provides syntax highlighting in programming and configuration files. Let’s open the Nano configuration file:

nano ~/.nanorc

nano ~/.nanorc

Add:

include /usr/share/nano/*.nanorc

include /usr/share/nano/*.nanorc

The syntax highlighter makes it easier to read scripts and configuration files.

Step 9: Set Nano as the Default Editor

Nano can be configured as the default text editor on CentOS 10.

export EDITOR=nano

export EDITOR=nano

To make it permanent:

echo ‘export EDITOR=nano’ >> ~/.bashrc

echo 'export EDITOR=nano' >> ~/.bashrc

It ensures that Nano is opened by default when a system task requires a text editor.

Step 10: Using Nano Over SSH on CentOS 10

Nano is compatible with SSH connections.

ssh user@server-ip

sudo nano file.txt

ssh centos@127.0.0.1

Nano’s lightweight design is ideal for remote server management.

sudo nano file.txt

Common Issues and Troubleshooting

Nano Command Not Found

  • Ensure Nano is installed
  • Verify your PATH variable

Permission Denied Error

  • Use sudo when editing system files

Terminal Display Issues

  • Resize the terminal window
  • Use an SSH client with UTF-8 support

That is all from the guide.

Conclusion

To install Nano on CentOS 10, update the system package index and use the DNF package manager to install the nano package. Once installed, verify the installation using the nano version command and start editing files directly from the terminal. Nano provides a simple, user-friendly command-line text editor ideal for configuration management, scripting, and remote server administration on CentOS 10.

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video