34 votes

Change default shell on MSYS2

I ran into this using the newer msys2-launcher, that provides .exe launchers rather than batch files. For this, it was simply a matter of changing the .ini files alongside the launchers inside the ...
Alan Pearce's user avatar
23 votes
Accepted

MinGW installer not working with proxy

New MSYS2 finally has proxy capabilites The new MSYS2 now uses pacman, the package manager from the arch linux project, to manage both msys and mingw packages. Pacman is capable of using ...
youR.Fate's user avatar
  • 534
20 votes

Use mklink in msys

Windows 10 now supports symbolic links without needing to run as administrator, so long as you turn on developer mode in the Windows settings. Once that is done, you can get ln working correctly with ...
AmeliaBR's user avatar
  • 301
16 votes
Accepted

How do I open the current directory in mingw's msys in file explorer?

$ start . the "start" command is a little like xdg-open for the Windows desktop (I believe even Windows 98 had the start command). If you are not working within an overlay that re-writes all of the ...
zielot's user avatar
  • 348
14 votes
Accepted

How can I change my MinGW/MSYS + mintty home directory?

Unlike Cygwin, MSYS relies on the HOME environment variable. To set or change your HOME variable: Press Win-r on your keyboard or select "Run…" from the Start menu. Type "sysdm.cpl" and click OK. ...
Ben Blank's user avatar
  • 1,064
13 votes

Use mklink in msys

You can use Windows native symlinks. To enable it uncomment line with: MSYS=winsymlinks:nativestrict in MSYS2 start bat file. And run MSYS2 with admin privileges.
driftcrow's user avatar
  • 231
13 votes
Accepted

Is the option "Use Git and optional Unix tools from the Windows Command Prompt" dangerous?

I agree with the other answers' general analysis and am also unable to predict exactly what kind of conflicts you could run into. I know I haven't noticed anything awry myself taking the third option....
ojchase's user avatar
  • 293
11 votes

"git mv *" returns "bad source" in Powershell

As has been pointed out by others in this thread, the star does not automatically expand to file names in PowerShell. Thus, the command let get-childItem needs to be used, which explicitely tells ...
René Nyffenegger's user avatar
10 votes

Install GCC in Git for Windows bash environment

USE MINGW-W64 Install mingw-w64 (Follow the "Sourceforge" link) and install it to the default Program Files based path. Select the latest "version" (for GCC), change "...
veganaiZe's user avatar
  • 269
8 votes
Accepted

Change default shell on MSYS2

The MSYS2 devs obviously keep changing their setup, because in the newest installs, the msys2_shell command that's installed in Windows to launch the MSYS2 environment(s) accepts a -shell argument. ...
FeRD's user avatar
  • 1,324
8 votes

MSYS2 home folder: show ~

The correct way to do this is to put this into /etc/nssswitch.conf : db_home: windows See here for docs. Also to make my homedir ls output more readable, I put this in ~/.bashrc : alias ls="ls -h -...
Rafael Kitover's user avatar
7 votes
Accepted

msys2 create a sym link into windows folder location

Same as Use mklink in msys reminding that mklink is a windows command, so it does not understand /c/mytestfolder but c:\mytestfolder must be used cmd /c 'mklink link c:\mytestfolder'
matzeri's user avatar
  • 2,448
7 votes

Change default shell on MSYS2

Edit /etc/nsswitch.conf, and change the setting below: db_shell: /bin/zsh
Michael's user avatar
  • 251
6 votes

Use mklink in msys

MSYS=winsymlinks:nativestrict requires you to run MSYS2 in elevated mode, I'm really not comfortable with that. This script only prompts for UAC elevation when invoked, of course it won't be useful ...
JimmyZ's user avatar
  • 69
6 votes

How can I change my MinGW/MSYS + mintty home directory?

The solution for MSYS2 is creating/updating /etc/nsswitch.conf with a line db_home: windows as described in Cygwin docs: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-home. ...
Konstantin Pelepelin's user avatar
6 votes
Accepted

Device names in MSYS2 dd

The device names are the same as in Linux, so your original commands should work as-is (no need for equivalents). You should be able to look up the device and partition names by reading /proc/ files: ...
user7023624's user avatar
5 votes

"git mv *" returns "bad source" in Powershell

As @PetSerAI said, the Windows command prompt and PowerShell will not expand the globing characters and it makes git mv fail. Use a bash shell like MSYS instead.
georgiosd's user avatar
  • 159
5 votes

MSYS shell in Windows Terminal Preview?

MSYS2 has their own guide to add MSYS2 to Windows Terminal. It uses msys2_shell.cmd instead of run the shell manually. Usage: msys2_shell.cmd [options] [login shell parameters] Options: -...
nouvist's user avatar
  • 171
4 votes

Change default shell on MSYS2

My install did not have the files mentioned in the accepted answer (msys2_shell.bat, mingw32_shell.bat, and mingw64_shell.bat). Instead my Win10 system install of MSYS2 (using the installer file ...
xtian's user avatar
  • 995
4 votes

msys2 create a sym link into windows folder location

In order for MSYS2 to use native Windows symlinks you need to set: export MSYS=winsymlinks:nativestrict Then ln -s creates dir or file symlinks: ln -s $USERPROFILE/tmp ~/tmp cd ~ cmd /c dir 2022-12-...
gavenkoa's user avatar
  • 1,986
4 votes
Accepted

MSYS shell in Windows Terminal Preview?

Assuming MSYS2 is installed in C:\msys2 folder, the commandline entry for Windows Terminal will be C:\msys2\usr\bin\bash.exe -i -l. Hence the entry in profile.json will be: { // Make changes here ...
Biswapriyo's user avatar
  • 11.2k
3 votes
Accepted

Reading environment variable in command alias causes evaluating it?

The first line of your function is indeed evaluating it. You could replace it by: echo ${TEST_LOG_FOLDER:?"empty_log_folder"} > /dev/null A better solution would be: [ -d "${TEST_LOG_FOLDER:?'...
AFH's user avatar
  • 17.5k
3 votes

"git mv *" returns "bad source" in Powershell

Using PowerShell to move the content of source to whatever folder you can run this command: Get-ChildItem .\source\ | ForEach-Object { git mv $_.FullName .\whatever\ } Your directory structure would ...
Nick's user avatar
  • 141
3 votes
Accepted

MSYS2 permissions

Ok, I've wasted quite a bit of time on this, so let me capture my findings: Changing fstab helps but you must chmod the file via a path that goes through the mount point. In other words: mkdir /c/...
Boris Kolpackov's user avatar
3 votes
Accepted

pandoc - markdown to man page tables not formatted (on msys2)

Well apparently I am a bit slow this week... simplest fix imaginable, and I only wasted 3 days: pandoc.exe -s -f markdown -t man ~/test.md | dos2unix.exe | man -l - (the key being the introduction ...
ehiller's user avatar
  • 334
3 votes

MinGW installer not working with proxy

If you are behind a corporate proxy which uses your windows login to authenticate you using NTLM or Windows Kerberos, it's best not to write down your password in clear-text config files. Instead, you ...
Dmitry Grigoryev's user avatar
3 votes

How to run internal cmd command from the msys shell?

win7/cygwin/bash had same problem, solution is to launch cmd twice, and convert slashes to backslashes as needed by cmd (for example): REPO_DIR=${REPO_DIR////\\} # Example, Turn c:/cvs into c:\...
mosh's user avatar
  • 297
2 votes

How to run internal cmd command from the msys shell?

Process Monitor helped track down the issue. It is that msys will convert /c to c:\ ; it needs to be escaped: cmd //c mklink. The way these conversions are done is explained here. – Mihai Rotaru Jan 1 ...
jpaugh's user avatar
  • 1,390
2 votes

Start MSYS in current folder

You can create a bash file and pass arguments to the msys2_shell.cmd to start anywhere you want it to be. msys2_shell.cmd -where "home/name/esp"
Brandan's user avatar
  • 21
2 votes

Source windows environment variables in MSYS

Using MSYS2, not sure if the same applies for MSYS. I have just been looking for the same thing several years later and it turns out the status quo for inheriting the PATH variable is - and I quote ...
kon's user avatar
  • 141

Only top scored, non community-wiki answers of a minimum length are eligible