unable to locate package nano
Linux

Unable to locate package nano

I was trying to execute nano, but I got the issue of -bash: nano: command not found in my Linux OS (Ubuntu).

codie@linux:~$ nano
-bash: nano: command not found

I tried to install it with sudo apt install nano, and got this issue of unable to locate package nano.

codie@linux:~$ sudo apt install nano
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package nano

So, how to fix the issue to unable to locate package nano or nano: command not found

I hope you’re not getting the issue of E: “Unable to Locate Package”. If ‘yes’, here is the fix for E: “Unable to Locate Package” error.

Fix unable to locate package nano

This fix also works on docker. So, let’s solve this issue.

sudo apt-get update
sudo apt-get install nano

This works on

  1. Debain Based OS(apt) : Ubuntu, Kali Linux, Fedora
  2. Red Hat Linux (yum/rpm)
  3. Arch Linux (pacman) : Garuda Linux , BlackArch, Deepin
  4. CentOS (yum)
  5. openSUSE (rpm)

Happy linuxing

0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Most Voted
Newest Oldest
Inline Feedbacks
View all comments

[…] If you don’t have nano or getting the issue of unable to locate package nano, here’s the fix for unable to locate package nano. […]

1
0
Would love your thoughts, please comment.x
()
x