Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

box name

Status
Not open for further replies.

tony500

MIS
Mar 20, 2002
19
0
0
US
How would I change my box name that shows up at the promt on every line. i.e. username@boxname] #
Tony You can usually find me at
 
hostname newboxname

You may have to logout then back in before you see the change to the prompt.

 
Or try perhaps

# hostname newboxname

for greater chance of it working.



 
How about:
Code:
export PS1="[\u@whateveryouwanttoseehere]\$"
;-)

And no need to logout for the change to be made. Once you find a happy prompt, add it to your ~/.bashrc, then
Code:
. ~/.bashrc

This prompt thing can really get out of hand too. Get started on your own CPU-intensive creation at:
--
JR
 
Doh! I interpretted that as a bash prompt question rather than hostname question. My fault.

Bleh. More reason not to surf when suffering from sleep deprivation ;-) --
JR
 
"I don't see anything wrong with RhythmAce's answer."

Only that it prolly should be done as su, ie from the # command line.

Pedantic. I know.



 
The # or $ has nothing at all to do with this. My root prompt is exactly the same as my regular user's prompt, except for the username part, of course. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top