How do I start cygwin with a specific command?

6,911

Solution 1

You could create a Windows shortcut with the target set like so (and an icon of your choice):

C:\cygwin\bin\ssh.exe [email protected]

Or, for better terminal emulation than in the default console window, run it in mintty, setting the shortcut target like this:

C:\cygwin\bin\mintty.exe /bin/ssh [email protected]

Solution 2

Make that the last line of your .bash_profile or .profile

Share:
6,911

Related videos on Youtube

Tamara Wijsman
Author by

Tamara Wijsman

In my free time I visit Stack Exchange to help out people with their questions and help maintain the community. Located in Belgium, I have studied Computer Science at the University of Antwerp and became a Master in Software Engineering. When I think a post can be improved I will try to do so by fixing grammatical or spelling errors, clarifying meaning without changing it, correcting minor mistakes, adding related resources or links. For the less obvious things of those I will leave a note in the edit, click on the date to see this. I will only edit content in posts once, and let the author or other users be free to choose to rollback; when there are opposing views, we can raise this to meta to let the majority decide which revision of the post they want. This will be done with respect of the original author and when I'm sure enough that it would only improve the post. Have a nice day! :)

Updated on September 18, 2022

Comments

  • Tamara Wijsman
    Tamara Wijsman over 1 year

    I want to start Cygwin and it should instantly connect to some server:

    $ ssh [email protected]
    

    for example, how I can achieve this?

  • eylon shabtay
    eylon shabtay about 13 years
    Not a good solution, because it stops you from running a local bash session. Also, all the stuff in bash startup files such as /etc/profile still gets run, which is a waste of time if you're just gonna ssh somewhere.
  • J-Dizzle
    J-Dizzle over 4 years
    Use this for setup though, e.g. I use "export DISPLAY=:0.0" here to setup gitk