Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I first installed and ran Cygwin, my username and PC name appeared at the beginning of the prompt, like

Johm@John-PC ~

The problem is, there was a typo in the account name when I first installed Windows 7 and it still remains in Cygwin.

I changed the Windows account name, changed the corresponding folder name and corrected the relevant registry (Local Machine->Microsoft->Windows NT->Current Version->profile list). Then I deleted Cygwin, including its registries, re-downloaded it, and installed it again.

But the old wrong user name still remains. How can I correct this?

share|improve this question
    
This answer on StackOverflow should help: stackoverflow.com/questions/225764/…;. –  boot13 May 20 '13 at 9:38

1 Answer 1

up vote 3 down vote accepted

Try editing the /etc/passwd file, the username can be changed in the first field. Avoid using spaces in the name

share|improve this answer
    
Could you tell me how can I edit /etc/passwd file? I'm not familiar with cygwin commands –  user67275 May 21 '13 at 8:08
1  
I believe you would type nano /etc/passwd (you must run Cygwin as an administrator) and you would edit it from the command line. Then you press CTRL + X, then Y and finally the enter key to save it. –  davblayn May 21 '13 at 10:29

Your Answer

 
discard

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.