CLI: Cygwin, Babun, etc

CLI: Cygwin, Babun, etc

Incredible articla: Windows Development Environment Perfect Dev Environment on Windows, the easiest way Installing web server on windows 10 – Siglar

What is what?

Get the Scoop, a Homebrew for Windows

Linux Emulators:

  • MSYS doesn’t seem to be developed anymore. It is the shell for the MinGW which is a Windows port of the GNU compiler tools, such as GCC, Make, Bash, and so on.
  • Cygwin is a large collection of GNU tools (like MinGW) but also an substantial POSIX API functionality layer. For example, you can use Unix feature such as pipes, etc. Sometimes too much of a Linux. See: Cygwin vs MSYS
  • MSYS2 is a rich environment as an evolution of the old MSYS. Package manager included is Arch Linux’s pacman. But it does have almost everything.
  • Windows Subsystem for Linux aka WSL 2 should be the future. Provide a Linux emulation layer and gives you access to real Linux distributions. It’s pretty weird and not everything works.


  • Clink is just cmd.exe enhancer, that provides the native Windows shell with the features of the Linux GNU Readline library from bash + small other enhancements. Clink doesn’t support Powershell.
  • ConEmu is and was for a long time the best terminal on Windows.
  • Cmder is ConEmu wrapper with integrated Clink and some visual customizations.
  • Babun is pre-configured Cygwin environment but it is discontinued as of 2019.
  • Microsoft Windows Terminal aka “WSL Terminal” should be the future, and is something like ConEmu only official.

Package Managers:

  • Scoop is easy to use and has the most of the command line tools I need. It manages the PATH so all the tools are available in native apps without any magic. See: Scoop vs Chocolatey
  • Chocolatey is package manager but at a higher level than Scoop. It’s less focused on being a shell and assumes you’re a Powershell user, which I’m not and barely understand. Useful for packages that cannot be installed with Scoop.

Current selection: MSYS2 + Cmder + Scoop Note: I don’t have mosh as it is Cygwin only (and Chrome?)


To install Scoop, in a PowerShell command console, run:

iwr -useb | iex

Install MSYS2:

scoop install msys2
# must run `msys2` as an administrator and just close the console once it finishes running all the commands 

Install Cmder:

scoop install cmder

Unify .SSH keys folder location

Be careful as you must not delete anything. If you delete private key, you will NEVER regain an access to that resource.

I’m tired of the current situation: Babun and probably any other cygwin derivate uses .SSH keys from c:\Users\<user>\.babun\cygwin\home\<user>\.ssh and the rest of the Windows ecosystem from c:/Users/<user>/.ssh. Therefore, terminal I’m using gets it from Babun, and editor I’m using (Visual Studio Code) gets it from Windows.

Immediately collect all the keys and config’s into c:/Users/<user>/.ssh folder. This will be, from now on, that ONE location for SSH keys and configs. From inside Babun (cygwin) type:

rm ~/.ssh -r
ln -s "/c/Users/cat $(whoami)/.ssh"  ~
chmod 600 ~/.ssh/config

Checked and everything works as expected.

Clink is sent from god

scoop install clink
clink autorun install

To retrieve the settings path and show values, type clink set

Integrate MSYS2 into Cmder

Installin MariaDB on Windows with scoop

Installing web server on windows 10 – Siglar

Environment variables I’ve removed: System:

C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler
   Remove this: "C:\Program Files\IDM Computer Solutions"
   Plus Registry
C:\Program Files (x86)\AOMEI Backupper
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\Program Files\Docker\Docker\Resources\bin



C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files\Intel\WiFi\bin\

Show variables:

$env:path -split ";"

But the proper way, without expanding environment names is:

System: (Get-Item -Path “HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment” ).GetValue(‘Path’, ‘’, ‘DoNotExpandEnvironmentNames’) User: (Get-Item -path “HKCU:\Environment” ).GetValue(‘Path’, ‘’, ‘DoNotExpandEnvironmentNames’)

There is Choco nice command refreshenv.

Everything in one line:

scoop install php composer

Install Git

scoop install git
scoop install openssh
# must be executed in powershell
[environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER')

.env must exist or composer install won’t finish

Create a project:

composer create-project symfony/skeleton my_project_name

To check if you are in 32bit or 64bit command prompt, type the following:

Babun officialy only supports 32-bit Cygwin


Symfony 4 how to enable prod mode?

Install MariaDB / MySQL via command line only

Installing web server on windows 10 – Siglar

In 64bit environment, type:

scoop install mariadb 

Must start cmd with admin privileges:

mysql_install_db --port=3306 --service=MariaDB --password=mypass -o

Open port in firewall (if needed):

netsh advfirewall firewall add rule name="MySQL Port" protocol=TCP dir=in localport=3306 action=allow
# netsh advfirewall firewall add rule name="MySQL Port" protocol=TCP dir=out localport=3306 action=allow 

Install and setup everything:


sudo mysql_install_db –port=4406 –service=MariaDB –password=mypass –verbose-bootstrap

Note: “mysqld –install” and “mysqld –remove” are suggested not to use anymore as we now have mysql_install_db and service removal can be done with simple call to sc delete <service-name>.

Moving slowly to native windows shell

I’m focusing more on PowerShell vs cmd.exe as that is obvious future.


Powerline patched font You probably need a font better than the default on Windows for some symbols to show up. Go to Nerd Fonts Repository and download a good powerline patched font. My personal preference is Meslo Nerd Font. Install it as per the instruction in the Repository Readme.MD

scoop bucket add nerd-fonts

Just once: $ scoop bucket add nerd-fonts Install each-font: sudo scoop install “Inconsolata-NF”

See which ones are available: scoop search “-NF”

And select MesloLGM NF in ConEmu

sudo scoop install DejaVuSansMono-NF DroidSansMono-NF FiraMono-NF Inconsolata-NF InconsolataGo-NF Monoid-NF Mononoki-NF RobotoMono-NF SourceCodePro-NF SpaceMono-NF UbuntuMono-NF Ubuntu-NF Tinos-NF

DejaVuSansMono-NF InconsolataGo-NF Mononoki-NF RobotoMono-NF Source Code Pro

PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command “Invoke-Expression ‘Import-Module ‘’%UserProfile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1’’’”

PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command “Invoke-Expression ‘Import-Module ‘’%UserProfile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1’’’” -new_console:d:C:\Projects\

Write-Host “$([char]0xE0B0) $([char]0x00B1) $([char]0xE0A0) $([char]0x27A6) $([char]0x2718) $([char]0x26A1) $([char]0x2699)”

Write-Host $([char]0x2122)

Coding fonts

Site to compare coding fonts: Dev Fonts

Stvarno lep font novi coding font: Geist Font — Vercel vercel/geist-font

Aliases in PowerShell

I have an aliases (most notable ll) in cmd.exe via clink, but in PowerShell it’s a bit different.

Import-Alias Alias.csv

Get-Alias ls

Remove stupid default aliases:

Remove-Item Alias:cat
Remove-Item Alias:cp
Remove-Item Alias:curl
Remove-Item Alias:echo
Remove-Item Alias:ls
Remove-Item Alias:man
Remove-Item Alias:mv
Remove-Item Alias:pwd
Remove-Item Alias:rm
Remove-Item Alias:rmdir
Remove-Item Alias:wget

Edit user profile:


or host specific:

ise $PROFILE.AllUsersAllHosts


Set-Alias -Name np -Value C:\Windows\notepad.exe

Simple aliases are easy to set,

Set-Alias ll "ls"

but passing parameters is more difficult. There is no need to set alias as function only works the same:

function ll { $a = $args; if ($args -eq "."){ $a = $pwd }; &"ls.exe" -lah --color=tty $a }
date 06. May 2020 | modified 13. May 2024
filename: Windows » Dev Environment » Cygwin, Babun, etc