1

I've put nano in the Windows PATH. Nano was initially available globally from the Windows command line but has now disappeared. I am loathe to restart the machine at the moment for a number of reasons. Anyone got any idea how nano could be still showing in the environment variable but be inaccessible from the command line?

Result of typing path and dir on command line:

PATH and DIR

C:\Downloads\nano-2.5.3>dir
 Volume in drive C has no label.
 Volume Serial Number is E42F-3D18

 Directory of C:\Downloads\nano-2.5.3

05/03/2016  18:09    <DIR>          .
05/03/2016  18:09    <DIR>          ..
14/11/2010  23:42            20,403 COPYING.DOC
14/11/2010  23:42            18,342 COPYING.txt
27/02/2015  01:20           109,597 cyggcc_s-1.dll
27/02/2015  01:20         1,034,269 cygiconv-2.dll
27/02/2015  01:21            42,013 cygintl-8.dll
27/02/2015  01:21         3,330,544 cygwin1.dll
14/11/2010  23:42            39,258 faq.html
14/11/2010  23:42            13,170 nano.1.html
05/03/2016  19:13           359,690 nano.exe
15/11/2010  00:29            76,444 nano.log
15/11/2010  01:02             8,882 nano.rc
14/11/2010  23:42             1,602 README.TXT
              12 File(s)      5,054,214 bytes
               2 Dir(s)  210,170,200,064 bytes free

C:\Downloads\nano-2.5.3>path
PATH=C:\Program Files\iis express\PHP\v7.0;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Graphviz 2.28\bin;c:\php;c:\Apache24;c:\Apache24\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.1.0\bin;C:\RailsInstaller\Ruby2.0.0\bin;C:\ProgramData\fujitsu\atom\bin;C:\Users\fujitsu\AppData\Roaming\npm;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;C:\Ruby22-x64\bin;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.1.0\bin;C:\RailsInstaller\Ruby2.0.0\bin;C:\ProgramData\fujitsu\atom\bin;C:\Users\fujitsu\AppData\Roaming\npm;C:\Downloads\nano-2.5.3\nano.exe

1 Answers1

1

How can nano be in the PATH but is inaccessible from the command line?

You have a space in your path after the last ;.

Remove the space and it should all work.

In addition, as pointed out in a comment by dxiv the path should only contain directory names, so replace C:\Downloads\nano-2.5.3\nano.exe with C:\Downloads\nano-2.5.3

Notes:

  • After setting the correct path you should close any open cmd shells and open new ones to pick up the revised PATH
  • Type path in a cmd shell to check your path.

Further Reading

DavidPostill
  • 162,382