The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Solaris 10 install doesn't display Network Connectivity prompt page sarahsi SUN Solaris 3 08-30-2007 09:44 AM
inconsistent ls command display at the command prompt & running as a cron job rajranibl SuSE 5 07-30-2007 09:26 AM
Solaris - unknown hostname - how can I change hostname? XNOR UNIX for Dummies Questions & Answers 1 03-29-2007 11:52 PM
Cisco Router command to get hostname rahulrathod UNIX for Advanced & Expert Users 3 02-15-2006 09:34 AM
no boot prompt display S26+ SUN Solaris 1 03-13-2005 03:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-12-2007
civic2005 civic2005 is offline
Registered User
  
 

Join Date: May 2005
Posts: 18
How to display hostname in command prompt

Anyone know


How to configure solaris 8 to display hostname in command prompt , everytime when you open a terminal screen .
  #2 (permalink)  
Old 10-12-2007
jess_t03 jess_t03 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 59
cat ~/.profile
echo $PS1
  #3 (permalink)  
Old 10-12-2007
joerg's Avatar
joerg joerg is offline
Registered User
  
 

Join Date: Jan 2002
Location: Germany
Posts: 167
Smile

Hi,
this is for the bash.

cd ~username # This change the current dir to the home directory of the user.

vi .profile # Open the .profile file inside the vi

export PS1="\u@\h:[\w] $ " # insert this line and !

u=user
h=host
w=current DIR

This is the promt:
user@hostname[current path]

regards
joerg
  #4 (permalink)  
Old 10-12-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,235
It depends entiely on the shell you are using, joerg has given a bash example but if you are not using bash you will need to use the method appropriate to the shell you are using.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0