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
- Debain Based OS(apt) : Ubuntu, Kali Linux, Fedora
- Red Hat Linux (yum/rpm)
- Arch Linux (pacman) : Garuda Linux , BlackArch, Deepin
- CentOS (yum)
- openSUSE (rpm)