🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #4016

Re: Mount cygwin root on Windows root

#4016
From: Gary Johnson
Date: Mon, 08 Jun 2009 22:30
53 lines
3038 bytes
In comp.unix.shell Keith Thompson <kst-u@mib.org> wrote:
> Ben <bgold12@gmail.com> writes:
> > Hey, I'm used to working with Windows (and using Command Prompt for my
> > "shell"), but I've recently been switching to using cygwin and bash.
> > The problem is, I really don't like having to go to /cygdrive/c to get
> > the actual Windows root, and although I played a bit with setting the
> > prefix to /c, I still would prefer to have the cygwin root "/"
> > coincide with the Windows root "C:".
> >
> > Currently I have the cygwin installation on the root ("C:"), which is
> > working perfectly, but I'd rather have the cygwin installation on C:
> > \cygwin. I've tried doing that and mounting "C:" on "/", which seems
> > to work, but it causes several bad side effects, like I can't get g++
> > to work, and I can't view any man pages ("Warning: cannot open
> > configuration file /usr/share/misc/man.conf"), etc. Does anyone have
> > any suggestions for how I can get this to work? Thanks.
> 
> Take a look at question 2.4 of the Cygwin FAQ,
> <http://www.cygwin.com/faq/>.

I wouldn't install Cygwin in C:\ because of that FAQ answer, but there
are some things you can do to avoid having to type /cygdrive/c all the
time.  One is that you can create an alias like this,

    alias cd-c='cd /cygdrive/c'

Another is that you can set the $CDPATH variable like this,

    export CDPATH=.:$HOME:/cygdrive/c

so that when you type "cd" followed by a directory name, bash will
search for that name first in the current directory, then in your $HOME
directory, then in /cygdrive/c.  I suppose you could also define a
variable, $C, like this,

    export C=/cygdrive/c

and then cd to directories under C:\ like this:

    cd $C/Program\ Files

I hadn't tried that last one before, but that works really well, because
it allows bash to do filename completion.  That is, if you type

    cd $C/Prog

and hit Tab, bash replaces that string on the command line with this
one:

    cd /cygdrive/c/Program\ Files/

-- 
Gary Johnson
Technical Details
Message-ID: <h0k3ee130ou@enews1.newsguy.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!not-for-mail
References: <c5d48487-df5f-4291-9c04-4f4c449a589c@h18g2000yqj.googlegroups.com> <ln7hznu041.fsf@nuthaus.mib.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: 4d82dd0a1,d8917dad2b48ef14
X-Google-Attributes: gid4d82dd0a1,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!not-for-mail
From: Gary Johnson <garyjohn@eskimo.com>
Newsgroups: comp.unix.shell,comp.unix.programmer,gnu.bash
Subject: Re: Mount cygwin root on Windows root
Followup-To: comp.unix.shell
Date: 8 Jun 2009 22:30:38 GMT
Organization: NewsGuy - Unlimited Usenet $19.95
Lines: 53
Message-ID: <h0k3ee130ou@enews1.newsguy.com>
References: <c5d48487-df5f-4291-9c04-4f4c449a589c@h18g2000yqj.googlegroups.com> <ln7hznu041.fsf@nuthaus.mib.org>
NNTP-Posting-Host: p44d1bfbfff000000cad6511763aab49fa0d6bf8ad1b72c00b32600b6ed5f005b.newsdawg.com
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/2.6.23.1-26.5.al3 (sparc64))