Alacritty on Windows 11 with MSYS2 UCRT64 bash with custom home directory
- Install Alacrity for Windows from https://alacritty.org/
- Install MSYS2 for Windows from https://www.msys2.org/
- Create minimal TOML configuration file for Alacritty
alacritty.toml in %APPDATA%\alacritty
[window]
opacity = 1.0
startup_mode = "Windowed"
padding.x = 10
padding.y = 10
decorations = "Full"
[window.dimensions]
columns = 128
lines = 48
[font]
size = 13.0
- Launch Alacritty on Windows to make sure it works.
- Add [shell] section in your TOML configuration file. Update according to your installation of MSYS2.
[shell]
program = 'c:\msys64\msys2_shell.cmd'
args = [ "-defterm", "-here", "-no-start", "-ucrt64", "-shell", "bash" ]
- Modify [shell] section to below
[shell]
program = 'c:\msys64\msys2_shell.cmd'
args = [ "-defterm", "-no-start", "-ucrt64", "-shell", "bash" ]
- Edit /etc/nsswitch.conf in MSYS2 (e.g. c:\msys64\etc\nsswitch.conf)
# Begin /etc/nsswitch.conf
passwd: files db
group: files db
db_enum: cache builtin
db_home: cygwin desc
db_shell: cygwin desc
db_gecos: cygwin desc
# End /etc/nsswitch.conf
- Add a path to db_home
e.g. c:\temp
db_home: /c/temp cygwin desc
e.g. H:\
db_home: /h cygwin desc
e.g. Windows home directory
db_home: windows cygwin desc