MSYS2: Difference between revisions

(Created page with "Bash for windows ==Package Management== [https://github.com/msys2/msys2/wiki/Using-packages Reference]<br>")
 
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Bash for windows
Msys2 is a collection of linux utilities which have been compiled for Windows.<br>
It is a fork of Cygwin.
 
==Getting Started==
* Install Msys2 from [https://www.msys2.org/ https://www.msys2.org/]
** Note: You can also install with <code>choco install msys2</code> but you will need to set start menu shortcuts yourself
* Install common developer tools
** <code>pacman -S --needed base-devel git</code>
** <code>pacman -S --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake</code>


==Package Management==
==Package Management==
[https://github.com/msys2/msys2/wiki/Using-packages Reference]<br>
[https://github.com/msys2/msys2/wiki/Using-packages Reference]<br>
<pre>
# Install a package
pacman -S <package>
# Uninstall a package
pacman -R <package>
</pre>
==Changing Home Dir==
Set the following:
* <code>db_home</code> in <code>/etc/nsswitch.conf</code>
*:<pre>db_home: /c/Users/david</pre>
* <code>HOME</code> environment variable to <code>%USERPROFILE%</code>
==Running Windows Programs==
* Go to <code>/c/msys64/msys2_shell.cmd</code>
* Uncomment <code>set MSYS2_PATH_TYPE=inherit</code>

Latest revision as of 13:54, 14 July 2021

Msys2 is a collection of linux utilities which have been compiled for Windows.
It is a fork of Cygwin.

Getting Started

  • Install Msys2 from https://www.msys2.org/
    • Note: You can also install with choco install msys2 but you will need to set start menu shortcuts yourself
  • Install common developer tools
    • pacman -S --needed base-devel git
    • pacman -S --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake

Package Management

Reference

# Install a package
pacman -S <package>

# Uninstall a package
pacman -R <package>

Changing Home Dir

Set the following:

  • db_home in /etc/nsswitch.conf
    db_home: /c/Users/david
  • HOME environment variable to %USERPROFILE%

Running Windows Programs

  • Go to /c/msys64/msys2_shell.cmd
  • Uncomment set MSYS2_PATH_TYPE=inherit