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

Is it possible to launch a Windows program from the Cygwin Shell? (similar to firing unix commands in PHP with "exec(…)")

My example: I'd like to launch a database backup in cygwin, however the mysqldump does not exist for cygwin. Therefore I need to fallback to the Windows version (c:\xampp\mysql\bin\mysqldump …). Is it possible to launch this from within Cygwin?

share|improve this question

migrated from Jun 5 '11 at 1:45

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

Sure, just run it. The path is probably something like /cygdrive/c/xampp/mysql/bin/mysqldump. Just remember that any paths you pass TO mysqldump need to be in Windows (not cygwin) format. Or you can use the cygpath program to convert the paths for you.

share|improve this answer

I do it this way:

In .bashrc, add alias start='cmd /c start'

Then use the start command as needed.

start .

Open the current directory in Explorer

start winword log.txt

Open log.txt in Word

There's also "cygstart" that may also work for you.

share|improve this answer

I found answer from SO site useful.

Find ".bash_profile" file in your cygwin installation path ( cygwin\home\user-name )

Put following lines in file.

export desktop="desktop path"

alias chrome="cygstart C:/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe"

alias dbDump="c:/xampp/mysql/bin/mysqldump"

save and close file.

NOTE: It is important to escape characters in path. and path should be in POSIX format and not in windows format. start bash prompt. Execute


This will open chrome window. or


This will execute mysqldump program.

If you want to change present working directory to desktop then

$>cd $desktop
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .