administrator@administrator:~$ - I want to change this name forever, can anyone help me ?
closed as unclear what you're asking by Eric Carvalho, Zanna, Sergiy Kolodyazhnyy, Anwar, Braiam Aug 27 '16 at 15:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
This actually displays your username@computername: along with the current directory and a $ sign, which usually means a non-root user, whereas a # sign would mean that you have root permissions.
Now, to only change what's displayed, you can edit your
~/.bashrc file. Open it with your favorite text editor and make changes to the line that starts with
If you have more than one line starting with
PS1=, try changing them one by one, while saving the
.bashrc file and opening a new terminal each time, to see if you edited the right one.
To just experiment with what's displayed, without messing up anything, you can type
export PS1="whatever you want". Once you close and reopen the terminal, it will set the value of PS1 back to the one in your
To actually change your username or computer name, there are already excellent answers:
You will need to log out and log in again to see the changes, unless you're changing the name of your computer, for which you'll need to reboot the machine.
The first administrator is your username, and the second one is the name of the computer (hostname). You can make another account with different username and rename your computer, but I suspect you don't want to do that. You can put whatever you like in your prompt in the terminal. The following variable determine, what are you going to see as a prompt:
- PS1 – Default interactive prompt (this is the variable most often customized)
- PS2 – Continuation interactive prompt (when a long command is broken up with \ at the end of the line) default=">"
- PS3 – Prompt used by “select” loop inside a shell script
- PS4 – Prompt used when a shell script is executed in debug mode (“set -x” will turn this on) default ="++"
- PROMPT_COMMAND - If this variable is set and has a non-null value, then it will be executed just before the PS1 variable.
Take look here:
Experiment with these variable and find out what you want :) For example:
export PS1="Hello.Master$ "
If you want your prompt changes to make permanent, you can put them in many places like: