Cygwin not cooperating

1

This is gonna sound very simple for you guys but I've never installed cygwin and the tutorial I used gave no contingency plan for when something goes wrong. I added the path C:\cygwin\bin to my Path and when I try to run ls or pwd from cmd.exe nothing seems to work. What did I do wrong with this install?

Alex Manley

Posted 2012-12-27T23:12:40.850

Reputation: 11

By "adding it to your path", do you mean you did that through the Control Panel? Did you then start a new copy of cmd.exe or whatever it was you were using to run ls so it could inherit the new path variable? – Nicole Hamilton – 2012-12-27T23:17:44.133

Yep thats exactly what I did – Alex Manley – 2012-12-27T23:22:26.083

So what do you get if you type set path into cmd.exe? Can you paste it here, please? I suspect you may have a typo that could be hard to spot. – Nicole Hamilton – 2012-12-27T23:26:53.667

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Alex>set path Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Com mon Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Window s\System32\Wbem;C:\Program Files (x86)\QuickTime\QTSystem;C:\Windows\System32\W indowsPowerShell\v1.0; C:\cygwin\bin;C:\Program Files\Common Files\Microsoft Sh ared\Windows Live PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC – Alex Manley – 2012-12-28T00:11:04.893

Answers

1

You have a spurious extra space in your path setting just before the C:\cygwin\bin entry: ...wsPowerShell\v1.0\; C:\cygwin\bin;C:\Program Files\Com.... Do you see it now?

Nicole Hamilton

Posted 2012-12-27T23:12:40.850

Reputation: 8 987

Okay thanks! I wasnt getting why it didn't work. Can you give an explanation of why this has to be set with no spaces? – Alex Manley – 2012-12-28T00:41:50.183

Because pathnames on Windows can have spaces and the parsing algorithm is really simple. It just assumes anything between semicolons must be a directory name, spaces and all. – Nicole Hamilton – 2012-12-28T00:51:57.460

@user1669657 Glad I was able to help. If this answers your question, I'd appreciate an upvote and an accept. – Nicole Hamilton – 2012-12-28T01:31:06.077

0

The Cygwin installer should be creating a shortcut for a Cygwin prompt. You shouldn't need to be changing your PATH or anything. Actually, if you're using a recent Cygwin, the default terminal program is now mintty. If really necessary (though it shouldn't be), you can manually create a shortcut that runs C:\cygwin\bin\mintty.exe.

jjlin

Posted 2012-12-27T23:12:40.850

Reputation: 12 964

True, but it should work fine if you put C:\Cygwin\bin on your path and run the Cygwin stuff from cmd.exe. You don't have to use their shortcut and bash starts faster if you don't. – Nicole Hamilton – 2012-12-27T23:29:45.973