How to Fix -bash: nano: command not found with CLI

If you’re new to Linux server management, you’re likely to get lot of errors like “Ëœ-bash: nano: command not found’. But don’t worry. This is not the kind of error that will lead you to disappointment. There’s an easy fix for this.

Taking about disappointment, there some errors that are capable of making you reinstall Ubuntu. Trust me, there are. I have experienced some of those. And there’s no choice whatsoever but to reinstall and start over. Lucky for you, this is the simplest error you can face when managing an Ubuntu server.

So let’s get to the point. You had below error when trying to create or edit text based file.

-bash: nano: command not found

This means, nano text editor is not installed on your Linux VPS. So install it by giving this command,

sudo apt-get install nano

It’ll install nano on your VPS, but only if your VPS is up to date. If not, you’ll get an error like this,

 Reading package lists... Done
Building dependency tree 
Reading state information... Done
E: Couldn't find package nano

The only solution for this is, updating your VPS. Run below command to update it. This is kind of like windows update. It won’t change or delete any files you already uploaded or created inside your VPS. It’s safe to execute.

 sudo apt-get update
sudo apt-get install nano

Hopefully this will solve your problem. Leave a comment if not.

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button