LinuxQuestions.org
Register a domain and help support LQ
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 01-21-2003, 02:47 PM   #1
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Rep: Reputation: 146Reputation: 146
strange command prompt


i've just changed from Mandrake to RedHat,
I've been using a seperate partition for the home directory and when i fired up RedHat for the first time I had a lot of problems logging in as as user until i moved all the old config files into a temp folder.

I don't know if there's a connection but..

my command prompt is now as follows:

bash-2.05b$

and not [localhost@localdomain]

is this ok? / dangerous? / silly? / inconsequential ?

many ta's
 
Old 01-21-2003, 03:00 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
erm, i guess your ~/.bashrc has not been run, maybe it doesn't exist anymore from whatever you've done. all the default files should be in /etc/skel. there's nothign wrong with what you've got, it's just the default prompt.
 
Old 01-21-2003, 03:58 PM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
try:

PS1="[\u@\h \W]$ "

That should give you the prompt you are used to. You can check out the bash-prompt mini howto for all sorts of stupid prompt tricks:
http://www.shelluser.net/~giles/bash...wto/book1.html
 
Old 01-21-2003, 04:21 PM   #4
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Original Poster
Rep: Reputation: 146Reputation: 146
ahh
is there anyway to make that command stick so that next time i open the terminal the prompt is the same ?

many thanks
 
Old 01-21-2003, 04:28 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Well, as acid said its usually in .bashrc, so if it doesn't exist create it in your ed of choice and put in:

PS1="[\u@\h \W]$ "
export PS1

If you have a .bashrc just throw it at the end. If you want this prompt system wide (for all users and root) put it in /etc/bashrc
 
  


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
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Getting out of command prompt squirellplaying Linux - Newbie 8 05-05-2004 09:44 PM
Mandrake 9.1: Strange bootloader prompt pnh73 Mandriva 8 10-16-2003 09:51 AM
im only getting command prompt sniperhf Linux - Software 10 06-16-2003 04:19 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 01:29 AM


All times are GMT -5. The time now is 02:22 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