I wanted to integrate git bash into IntelliJ, so I've changed the default terminal path to C:\Program Files\Git\bin\sh.exe. After some time I noticed that some commands are not working, for example:


$ ll                                                                                                                    
bash: ll: command not found

Also some programs are not working. I am using MQTT CLI, downloaded it, configured the PATH variable properly but the command mqtt is only working in git-bash.exe.


$ mqtt
bash: mqtt: command not found


$ mqtt

Usage:  mqtt [-hV] { pub | sub | shell }

MQTT Command Line Interpreter.

  -h, --help      Show this help message and exit.
  -V, --version   Print version information and exit.

  pub, publish    Publish a message to a list of topics
  sub, subscribe  Subscribe an mqtt client to a list of topics
  shell, sh       Starts MqttCLI in shell mode, to enable interactive mode with further sub commands.

2 Answers 2


sh is a restricted shell that can only be used for Git operations. The documentation describes it as:

This is a login shell for SSH accounts to provide restricted Git access. It permits execution only of server-side Git commands implementing the pull/push functionality, plus custom commands present in a subdirectory named git-shell-commands in the user’s home directory.

This shell helps prevent you from accidentally running dangerous scripts when all you wanted to do is some Git work.

Bash, on the other hand, is a full Linux-like command environment, where you can run any installed software, both Windows CLI tools and special-built bash executables and scripts.

  • This answer is plain wrong. I have a fresh installation of Git for Windows and have executed c:\Program Files\Git\bin\sh.exe. In that shell, I typed notepad, and it opened notepad.exe, although there is definitely no subdirectory git-shell-commands in my home directory which would allow that, and although notepad.exe for sure is not a server-side Git command. Still looking for the equivalent of git-shell in Windows ...
    – Binarus
    Mar 7, 2022 at 6:53

git-bash is an embedded system with all the stuff and libs to run git − and even more − including bash.

bash/sh is only the shell commander.

In your case, ll is an alias.

In git bash (which includes grep)

$ alias | grep ls
alias ll='ls -l'
alias ls='ls --color=auto'

You must log in to answer this question.

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