nano command not found

In this troubleshooting guide we learn how to fix nano command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

nano: command not found

or when using sudo you get the following error message

sudo: nano: command not found

Solutions to nano: command not found

How To Fix nano: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu nano is provided by nano package.

nano is:

GNU nano is an easy-to-use text editor originally designed as a replacement for Pico, the ncurses-based editor from the non-free mailer package Pine (itself now available under the Apache License as Alpine).

However, GNU nano also implements many features missing in Pico, including:

  • undo/redo
  • line numbering
  • syntax coloring
  • soft-wrapping of overlong lines
  • selecting text by holding Shift
  • interactive search and replace (with regular expression support)
  • a go-to line (and column) command
  • support for multiple file buffers
  • auto-indentation
  • tab completion of filenames and search terms
  • toggling features while running
  • and full internationalization support

To fix this problem, we can install more using the command below.

sudo apt-get -y install nano

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install nano.

sudo apt -y install nano

Or if you have aptitude installed you can use the following command.

sudo aptitude install nano

Summary

In this tutorial we learn how to fix nano command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.