Getting different prompt in Cygwin

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
JustChris
Posts: 21
Joined: Thu Nov 03, 2005 7:17 am

Getting different prompt in Cygwin

Post by JustChris »

I recently installed some new file packages for Cygwin and now the prompt says "bash-3.2$" instead of "username@machine $". And the default directory seems to have moved to /usr/bin. For now I can no longer use some of the Unix commands nor do any development with it.

I'm only certain that a re-install is unnecessary to correct the problem. Maybe it's something in my user folder's .bash_profile that needs to be changed?
DoctorRockit
Posts: 5
Joined: Sun Dec 10, 2006 3:12 am

Post by DoctorRockit »

While you can easily fix the shell prompt by setting the PS1 environment variable to something like "\u@\h \w$ " your description sounds as if something else is seriously wrong.

Try rebuilding /etc/passwd by executing: mkpasswd -l > /etc/passwd
and restart the cygwin shell afterwards.

HTH
JustChris
Posts: 21
Joined: Thu Nov 03, 2005 7:17 am

Post by JustChris »

Editing the .bashrc changes the prompt, but it doesn't restore the original functionality. I still can't use some commands such as make or ls (though cd and pwd work). Thus, Cygwin cannot find the command 'mkpasswd' when I enter it in the command line.
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

Check that the .bashrc is in unix text format (no character 0x0D before 0x0A).

I had the file long ago in windows/dos format, and it was working, until some day suddenly after a cygwin update, it stopped to do it until i converted it to unix format.
Post Reply