Unix/Linux Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Changing the UNIX command prompt

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-22-2002
WERUreo WERUreo is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 22 April 2002, 11:49 PM EDT
Location: Daytona Beach, FL
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Changing the UNIX command prompt

I am having a hard time figuring out how to change the command prompt in my UNIX shell.

I am using the bash shell, and I would like to set the prompt to show me the full path of the current working directory along with my username, I suppose... The main thing I want is the full path of the current working directory.

This is for a web hosting shell account... I have three files in my root directory: local.cshrc, local.profile, and local.login. I know I need to put something in one of these files, but I'm not sure. Any help would be appreciated...

Keli'i Martin
Sponsored Links
    #2  
Old Unix and Linux 04-22-2002
auswipe's Unix or Linux Image
auswipe auswipe is offline Forum Advisor  
Registered User
 
Join Date: Nov 2001
Last Activity: 28 May 2012, 1:32 PM EDT
Location: Wide Awake Wylie, Texas
Posts: 537
Thanks: 0
Thanked 0 Times in 0 Posts
This what I use on my systems with the bash shell:


Code:
PS1='`uname`:`whoami`:$PWD $ ';export PS1

At the command prompt I see:


Code:
FreeBSD:joeuser:/home/joeuser $

I use the `uname` so that I am reminded which system that I am on. I have a FreeBSD and OpenBSD machine and jump back and forth a whole bunch.
Sponsored Links
    #3  
Old Unix and Linux 04-22-2002
WERUreo WERUreo is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 22 April 2002, 11:49 PM EDT
Location: Daytona Beach, FL
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the help with changing my prompt. If I wanted my prompt to stay like that every time I log in, what file would I put that line in? local.cshrc, local.profile, or local.login?

EDIT: Never mind, I was able to figure it out... Thanks again for all the help! Unix or Linux Image
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[Solved] Help needed to have changing value to the command prompt string variable PS1 royalibrahim UNIX for Dummies Questions & Answers 2 04-26-2012 01:46 AM
Can Unix access Windows' File through Command Prompt in Unix jessy83 UNIX Desktop for Dummies Questions & Answers 5 12-22-2011 02:19 PM
Unable to get the db2 command prompt in unix ragavhere UNIX for Dummies Questions & Answers 4 11-26-2008 04:44 AM
Changing text in the command prompt unipepper Shell Programming and Scripting 10 03-07-2007 11:49 AM
Changing Unix Prompt unclefab UNIX for Dummies Questions & Answers 4 01-07-2005 04:38 PM



All times are GMT -4. The time now is 08:29 AM.