LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2004, 10:49 AM   #1
ultreen144
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Thumbs up Change prompt on FC1 (not motd or /etc/issue)


Whats up?

My question is this...
your prompt in a terminal after you login is defaulted to user@hostmachine then your user
name. How can you alter this line?

Thanks for your help!


---------------------------------- - - - ------------------
Awwww, what do you mean it BROKE???
Stupid Windows, Computers Are For Linux
---------------------------------- - - - -------------------
 
Old 06-02-2004, 11:56 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
You change the prompt by changing the value of the PS1 shell variable. You can look up all the options for it by looking at the man page for bash (man bash). Other shells use a different variable, but there will be a corresponding variable.

Assuming you're using the bash shell, you can edit two files to get what you want:
1. ~/.bashrc
2. /etc/bashrc

Editing ~/.bashrc will be a personal change. That is, only you will be affected. Setting the value in this file overrides the global default.
Editing /etc/bashrc will make the change the global default. Every user will have the new-style prompt unless they have explicitly defined something else in their own ~/.bashrc file (as described above).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change CD crash in FC1? Vampirite Fedora 4 05-03-2005 10:18 AM
FC1 Installation Issue mikeymorgan Fedora - Installation 2 03-26-2005 03:41 PM
Issue with FC1, mouse, and XFree yanger Fedora - Installation 2 06-28-2004 11:25 PM
Change security level in FC1 linx win Linux - General 2 06-09-2004 04:41 PM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration