Whenever you launch Git Bash, it always starts somewhere at the upper left corner of the screen.
If you donât like that and want to change the position, you have to drag it every time âš
In this step-by-step tutorial, Iâll show you how to change the Git Bash launch position and set it exactly where you want it on the screen.
Letâs get started đ
đĽ Prefer a video instead? I got you covered:
Check Git Bashâs emulator
First, you have to check what terminal emulator Git Bash is using under the hood.
This is an option that pops up during the Git installation, but if you donât remember what youâve selected, donât worry, weâre going through that right now.
To check if Git Bash is using MinTTY or another terminal emulator, you can examine the $TERM
environment variable.
To do that, open Git Bash and run the following command:
echo $TERM
If it says xterm
, you are likely using the MinTTY terminal emulator.
If it says something else, such as xterm-256color
, it might indicate another terminal emulator or console, like the default Windows CMD.
If youâre still not sure, you can also check the emulator/console by right-clicking on the top of Git Bash and selecting Properties.
If it says cmd.exe
, then youâre using Windowsâ default console, the CMD.
If the window doesnât have the Properties menu but the Options⌠menu and has the M logo, then itâs using MinTTY.
We will now go through both options, MinTTY and CMD, and see how to change the launch position.
MinTTY
Open the C:\Users\<username>\.minttyrc
file. If you donât have the file, you can go ahead and create it.
Next, specify the X and Y positions in two new lines like this:
X=700
Y=350
I want the terminal to open by default somewhere in the middle of the screen. You can adjust the X and Y values as you like.
Windowsâ CMD
Letâs see how to change the position of Git Bash when itâs using the Windowâs CMD interpreter.
Right-click on the top of the Git Bash window and select Properties.
Then go to Layout, then Windowâs Position, and change the Left and Top positions as you like.
That was it, happy coding đ
Let me know what you think about this article in the comments section below.
If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.