Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bash startup script in Windows

Tags:

bash

windows

I am using the Bash shell with Git in Windows. I have a number of aliases I wish to setup when I open the shell. Is there a configuration file that is invoked for each Bash instance that is brought up?

like image 373
John Livermore Avatar asked Apr 18 '12 20:04

John Livermore


People also ask

How do I automatically run a Bash script in Windows?

On Windows, the simplest way of running a program at startup is to place an executable file in the Startup folder. All the programs that are in this folder will be executed automatically when the computer opens. You can open this folder more easily by pressing WINDOWS KEY + R and then copying this text shell:startup .

How do I create a Windows startup script?

To assign computer startup scriptsIn the console tree, click Scripts (Startup/Shutdown). The path is Computer Configuration\Windows Settings\Scripts (Startup/Shutdown). In the results pane, double-click Startup. In the Startup Properties dialog box, click Add.


1 Answers

Thanks @Blender, that was the answer. Here is what I did...

Start bash (Git bash)

cd
touch .bashrc
notepad .bashrc
source .bashrc # To make changes available without restart

entered aliases...save
close bash
start bash
aliases are now available!

like image 64
John Livermore Avatar answered Dec 09 '22 16:12

John Livermore