Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a small script,, that I want to run every time I start Cygwin - right now it just echoes "hello" but I want it to have useful functionality later.

Another post said to modify my .bash_profile file which I did, appending "source", but it didn't do anything.

Is there a way to do this? Running latest Cygwin from Win7.

share|improve this question

migrated from May 31 '13 at 6:23

This question came from our site for professional and enthusiast programmers.

You could try appending that line to .bashrc, because it is possible that .bash_profile isn't actually being run. – Alex Gittemeier May 31 '13 at 3:25

I put things like this in my .bashrc file.

It's more common to execute scripts like this (rather than using the source command):


More specifically it might look like this:


The file has to be executable and should begin with something like this:


You can substitute bash with your shell of choice.

share|improve this answer

You must log in to answer this question.