Results 1 to 3 of 3
  1. #1

    How do I change the the name on the shell prompt


    Does anyone know how to change the name for the shell prompt once you login to shell, I have multiple servers and want to keep track of each shell prompt since most of the time I have multiple prompts open on my computer and forger what server is what.

    Right now it says

    [email protected]

    and I want it to say

    [email protected]

    I have changed setting in the host file, but that does not work so I believe there is a shell program file that needs to be changed so I can customize what I am needing.

    Any help would be greatful.

  2. #2
    Join Date
    Dec 2004
    I'm pretty sure that this is correct for RedHat, but I don't have a box handy to make sure...

    Edit /etc/hostname and make it contain the server name you desire, then run 'hostname <the host you want>' as root to change the running instance. Make sure the new hostname has an entry in /etc/hosts as well, or some programs that use networking may have trouble. Subsequent logins should then use the new hostname.

    This belongs in another forum, as well.

  3. #3
    or change the value of $PS1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts