2

I am trying to install nano editor. From all the previous posts, I am stuck on path. What is path? How do I fix put my path?

I have:

$ mv nano ~/path/to/git/share
$ nano abc 
bash: nano: command not found 
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
SimonMatt
  • 53
  • 1
  • 4

3 Answers3

2

You can add it via chocolatey.

choco install nano
Pellet
  • 2,254
  • 1
  • 28
  • 20
  • 1
    But to do that, you'll need to install Chocolatey, by running: `powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))` (or just follow the Chocolatey installation instructions at https://chocolatey.org/install ) – cowlinator Jul 29 '21 at 22:22
0

PATH is the environment variable which is used to locate an executable you want to run.

See "How to permanently set $PATH on Linux?": you can add the folder where nano is in your .bashrc (which you can create directly under %USERPROFILE%, used by Git bash as $HOME)

Add to ~/.bashrc:

 export PATH=$PATH:~/path/to/git/share

Then type

 source ~/.bashrc

If you don't want to add it to your PATH, you can follow this step-by-step procedure, which does include the installation of nano-git-0d9a7347243.exe.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hi, I am using Windows and trying to install nano on Git Bash. I need complete step by step. I am very new here. – SimonMatt Jun 15 '17 at 12:21
  • @SimonMatt what posts are you following? Do you have a link? What version of Git are you using? – VonC Jun 15 '17 at 13:05
  • @SimonMatt I have added a link to an even simpler procedure (no PATH modification needed) – VonC Jun 15 '17 at 13:12
0

If your ultimate goal is to have and use nano on Windows 10, you can download the nano installer from here and just install the .msi file the usual Windows way. No manual path configurations required.