cygwin question

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
I installed cygwin because I wanted a way to use UNIX commands at a windows command prompt. The only problem is, whenever I open the cygwin bash shell, I can't navigate outside the /home directory it creates inside it's installation folder. Is there a way to use cygwin's bash shell to navigate to any folder on my computer?

If not, is there any other utility that would give me UNIX command functionality at a windows command prompt?
 

Rilex

Senior member
Sep 18, 2005
447
0
0
There is Services For Unix 3.5 (or Windows 2003 R2), or UNIX utilities for Windows......etc.
 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.
 

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Is %PATH% something within windows, or within cygwin? How exactly do I do what you are describing?

Sorry, this is all pretty new to me.
 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
Originally posted by: Special K
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Is %PATH% something within windows, or within cygwin? How exactly do I do what you are describing?

Sorry, this is all pretty new to me.
My Computer -> Properties -> Advanced -> Environment Variables -> System Variables -> Path -> Edit

Prepend the cygwin bin path (suffixed with a semicolon). It might look something like this when you're done:

C:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Who in their right mind would want to use CMD when you have bash availible?
 

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
Originally posted by: sciencewhiz
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Who in their right mind would want to use CMD when you have bash availible?

Well how do I navigate outside of the cygwin /home directory through bash? That was part of my orginal question. The highest level I can go in bash is /home. I can't go to C:\, for example.

 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
Originally posted by: Special K
Originally posted by: sciencewhiz
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Who in their right mind would want to use CMD when you have bash availible?

Well how do I navigate outside of the cygwin /home directory through bash? That was part of my orginal question. The highest level I can go in bash is /home. I can't go to C:\, for example.

Did you try as I suggested and "ls /cygdrive"?
 

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
Originally posted by: xcript
Originally posted by: Special K
Originally posted by: sciencewhiz
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Who in their right mind would want to use CMD when you have bash availible?

Well how do I navigate outside of the cygwin /home directory through bash? That was part of my orginal question. The highest level I can go in bash is /home. I can't go to C:\, for example.

Did you try as I suggested and "ls /cygdrive"?

Ah, ok, that works.

Now how do I configure bash to always start there instead of in /home?

 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
Originally posted by: Special K
Originally posted by: xcript
Originally posted by: Special K
Originally posted by: sciencewhiz
Originally posted by: xcript
ls /cygdrive

If you add the cygwin bin directory (ie. c:\cygwin\bin) to your %PATH% you'll be able to use the commands via CMD.

Who in their right mind would want to use CMD when you have bash availible?

Well how do I navigate outside of the cygwin /home directory through bash? That was part of my orginal question. The highest level I can go in bash is /home. I can't go to C:\, for example.

Did you try as I suggested and "ls /cygdrive"?

Ah, ok, that works.

Now how do I configure bash to always start there instead of in /home?

echo cd /cygdrive >>~/.bashrc