Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu '-bash: nano: command not found'

I am trying to use Ubuntu 18.04 to download ModSecurity on Google Cloud, but whenever I try writing sudo nano *file*.conf or nano *file*.conf. I get an error saying -bash: nano: command not found or sudo: nano: command not found. I'm not sure if it is because I'm using Google Cloud Platform for this, but I just need to know how to solve this problem

like image 354
David Babablola Avatar asked Jun 17 '20 12:06

David Babablola


People also ask

What is nano command in Ubuntu?

Introduction. GNU nano is a simple terminal-based text editor. Though not as powerful as Emacs or Vim, it is easy to learn and use. Nano is ideal for making small changes to existing configuration files or for writing short plain text files. It was originally created as a free replacement for the non-free Pico editor.

How do I open nano editor in Git bash?

GNU Nano is yet another text editor for the Unix system that comes pre-installed with Git Bash. If you are working in command prompt in windows then you might not be able to open Nano as the text editor. Nano can be opened inside Git Bash by typing "nano" as the command.

Is nano on all Linux?

Nano is generally by default available in many Linux distributions but in case, it is not installed you may install the same using the following commands.

How to fix nano command not found in Linux?

If you are running any Linux version or derivatives such as Fedora, RHEL, Ubuntu, Arch etc. and you get the error nano command not found. It means Nano text editor doesn’t install in your Linux machine So first thing you must do Install nano text editor on Linux.

How to open a nano file in Linux terminal?

As it is a command-line editor, now your first step is to open the terminal. You can open the terminal and the easiest way to access the terminal is the Ctrl+Alt+T shortcut key. You can use nano command without any argument, You will get open a blank nano file.

What does <command> not found mean in Linux?

"<command> not found". This means that it's not installed, isn't located in a preset PATH location, or perhaps not executable for some reason, such as permissions. Like most general use programs, nano is usually installed to /usr/bin. Of course you don't need nano.

How do I install the nano application on Ubuntu?

The 'nano' application is not installed. You can install it by typing: apt-get install nano If I type apt-get install nano the nano app still isn't installed. What should I do? In case that didn't work out for you, you can still use vim or gedit in place the place of nano Not the answer you're looking for?


2 Answers

Try running sudo apt-get install nano

It appears nano isn't installed on your machine

like image 86
SerialEnabler Avatar answered Oct 13 '22 21:10

SerialEnabler


Seems nano is missing on this ubuntu.

Try: sudo apt-get install nano

like image 3
Adi Dembak Avatar answered Oct 13 '22 21:10

Adi Dembak