0

I'm trying to switch from cygwin to msys2. I use cygwin extensively for the Unix tools, not so much for building software but just as my command-line environment to make Windows more Linux-like - I live in the shell almost all the time. I often mix native tools like python, perl, depends, vc (Windows compiler), emacs and others with the cygwin utilities. (I don't use the cygwin versions of those because of path handling among other things.) Over the years I've come to an environment that works pretty well, which is to mount cygwin's root as c:/, so all my absolute paths are the same whether I happen to use a cygwin util or some native command. (As long as everything is really on the C drive of course.)

I'm trying to set up msys2 like this, but I can't figure out how. Msys2 won't let me install in c:/ (it refuses because its uninstaller would delete the whole install dir -- that makes sense). I tried mount c:/ / but it says operation not permitted. Is there any way to do this in msys2? I expect you're going to say don't do that, but I really just want Linux utilities to work on the Windows filesystem, not in a sort of chroot subsystem. Having to remember to add "/c" to paths if something happens to be msys2 or subtract it if not is painful; I'd rather stick with cygwin in that case.

9
  • are you aware that windows uses `C:\` that's backslash
    – barlop
    Commented Aug 19, 2015 at 15:03
  • perhaps it'd help if you described what you mean when you say you mounted "cygwin's root as c:/" like copy/paste from the command line.. Do you mean C:\ is your profile directory? Normally if cygwin is installed in c:\cygwin then within that there's a directory called home, and within that, a profile directory.Where's your cygwin bash.exe is it in c:\bin\bash.exe? or c:\cygwin\bin\bash.exe ?
    – barlop
    Commented Aug 19, 2015 at 15:04
  • this link mentions about it in cygwin cygwin.com/ml/cygwin/2012-10/msg00241.html so you managed to configure it to be able to do ls /windows rather than ls /cygdrive/c/windows?
    – barlop
    Commented Aug 19, 2015 at 15:22
  • also i'm not aware that mingw/msys has a shell.. It seems from this you just install it it puts the EXEs in a directory which you add to the path mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite So it's not clear ot me where you are having a problem. Show copy/pastes from the command line
    – barlop
    Commented Aug 19, 2015 at 15:27
  • Re: backslash: yes, both work almost everywhere. I use fwd for consistency.
    – GaryO
    Commented Aug 19, 2015 at 17:14

1 Answer 1

0

You're right, we're going to tell you not to do that.

You're trying to nuke the Unix emulated virtual file system with C:, which will effectively break everything. Not only is this not going to work, it's not the right way to think about solving this.

Add Windows %PATH% to your MSYS2 path (google how to do that). Bam, now Windows apps/commands can be run from the MSYS2 console.

Symlink things from /c/... to ~. Things like your Downloads, Documents, Workspace, etc folders. Bam, now you have shorthand access to all your important locations.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .