Server Fault is a question and answer site for system and network administrators. 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

My .bashrc looks like this:

alias name@server="ssh server sname"
echo "bashrc read"

The echo statement is just for checking if it is read. But the echo does nothing. I want to set an alias for a quicker ssh into a box doing a certain command which is a working alias on the remote box.

share|improve this question
up vote 19 down vote accepted

I haven't used cygwin in some time, but I'm guessing that it wants ~/.bash_profile. Simple fix to test.

ln -s ~/.bashrc ~/.bash_profile

Or if ~/.bash_profile exists, source .bashrc.

if [ -f ~/.bashrc ]
  . ~/.bashrc
share|improve this answer
I added a .bash_profile and put the source part in it. Worked... Thx – boutta Jun 4 '09 at 7:20

Because your cygwin bash is a login shell which reads the profile files, not the rc files. See jtimberman's answer for the second part of the answer... .

share|improve this answer

as jtimberman said, it's probably using .bash_profile. Another one to remember about is .profile.

share|improve this answer

You need to resolve the ip. simply add the "ipaddress sname" to your C:\WINDOWS\system32\drivers\etc\hosts files and it should resolved it.

example: localhost [ipaddress sname]

share|improve this answer
ohh you might need to type in "source .bashrc" to get it to reload the alias... :) – Dao Oct 30 '09 at 17:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.