Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Whenever I run a terminal in Linux (Centos), my console line starts with:


During the Centos installation, I created a user 'mark'. Later on that day, I needed to change the name to 'john' for some reason.

So I went into these files and changed 'mark' to 'john'

mv mark john

After a restart, I'm now getting the bash-4.1$ prompt on the terminal.

share|improve this question

migrated from serverfault.com May 8 '13 at 6:34

This question came from our site for system and network administrators.

Read the usermod and groupmod manpages, man bash will be useful too. Check the startup scripts section. – dawud May 8 '13 at 6:17
My guess is that you didn't rename your home directory from /home/mark to /home/john. And so you have no profile configuration. – Zoredache May 8 '13 at 6:34
@Zoredache exactly what I thought. Might need to ensure his permissions will allow him to read the folder if he chooses to rename it. – Tim May 8 '13 at 17:32

Depends on what things you edited in the mentioned files. Probably, as Zoredache mentioned, you forgot to change the /home/mark to /home/john either in the passwd or on the filesystem. Also there is an entry in passwd which tells the default shell for the user.

You can also set default shell of existing user by usermod -s <path to shell> <username> command.

share|improve this answer
CentOS recommends chsh for shell change. – Tim May 8 '13 at 17:31

Your Answer


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