What you are trying to change is the PS1
variable.
It is not an environment variable but a bash shell variable.
If you are interested in learning more about that look here.
To be brief, if you want to just change the part where traditionally you'll see the server name, just to the following:
1 In a terminal echo $PS1
.
You will probably see something like:
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
In it \u stands for Username and \h stands for Hostname.
2 Still in the terminal try doing:
PS1="\[\e]0;\u@\What you want the hostname to be: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@What you want the hostname to be\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$"
Notice the quotes that need to be added here but won't be in stage 3.
3 When you are satisfied with the results go to your .bashrc file and replace what it says in the line where PS1 is defined. Notice that it appears several times in the file and that each one should be changed differently and separately (ideally, at least).
Save and quit the file.
4 Type . ~/.bashrc
, this should reload the file and start presenting the prompt you have set.
All we did currently will change it for your user. It will not change it for the root user.
To do that you must edit the file /root/.bashrc in a similar fashion.
Good luck!