Is there a command to check if Git Bash is open in admin mode?

Let's say you open the Git Bash console and have been using it for a while, but you forgot if you opened it as Administrator or not.

Is there a way to test this in the current console without closing and opening it again?

+3


source to share


2 answers


You can try linux command like:

whoami

      

This will return the name of your system



or windows command:

ECHO %USERNAME%

      

0


source


Yes, you can check the current username using the following command:

git config user.name



This will return the username and you can find out if he is an Administrator.

-1


source







All Articles