msysGit sudo-like command msysGit sudo-like command windows windows

msysGit sudo-like command


you can't do it from the taskbar

You could though: press ctrl+shift while you are clicking on the icon, and it will open as Administrator.

Note: msysgit is based on msys, which doesn't include any sudo-like command.

As commented by aheryan, you can type ctrl+shift+enter when you're searching for Git Bash from the Start Menu: that will also launch it as Administrator.


June 2021: Svens suggests in the comments another approach:

You can make the taskbar symbol always open gitBash as admin automatically:

  • right-click it,
  • then right-click on "git Bash",
  • then open "properties"
  • Button "Advanced" opens another dialog with a checkbox for "Run ad administrator".

If you activate this, the "shortcut" in your taskbar will always open with admin permissions (the exact same works with Desktop icons and any other shortcuts).