LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2012, 10:08 AM   #1
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: openSUSE 42.2 LEAP- KDE
Posts: 241
Blog Entries: 1

Rep: Reputation: 9
How do I change my Bash Shell prompt (in Fedora)?


Hi, this is probably something simple but I wouldn't know where to start exactly but it goes like this. I need to change my current bash shell, which is appearing like this:

Code:
bash-4.2$
to what I am accustomed to and what it should look like which is:

Code:
kevin@asus-k53e$
I don't know why it is different other than it may have something to do with how I used the same /home directory from a previous openSUSE system, now in Fedora an it complained after the first login about there already being a user "kevin".

My
Code:
su
bash looks fine though.

Any help would be great!
 
Old 07-11-2012, 10:24 AM   #2
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Here is something that would help
http://www.linuxselfhelp.com/howtos/...mpt-Howto.html
 
Old 07-11-2012, 10:30 AM   #3
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: openSUSE 42.2 LEAP- KDE
Posts: 241

Original Poster
Blog Entries: 1

Rep: Reputation: 9
Quote:
Originally Posted by honeybadger View Post
Thanks but that link is dead (returns a 404 error)
 
Old 07-11-2012, 11:55 AM   #4
Farzan Mufti
LQ Newbie
 
Registered: Feb 2007
Location: USA/Canada
Distribution: Red Hat, CentOS, Scientific, Fedora, Ubuntu, SUSE, SLES
Posts: 14

Rep: Reputation: 6
Configuring Your Bash Command Prompt

You need to set your PS1 variable. This configuration is consistent with all distributions.

You should also set it in your bash profile file, perhaps your personal settings profile file (~/.bash_profile).

Some useful escape sequences
\u – Username
\h – Hostname
\w – Full path of the current working directory
\! - The history number of the command
\@ - Current time

Apart, you can also use external commands, e.g. date
export PS1="\u@\h [\$(date +%k:%M:%S)]> "

For a complete reference, please check out the following link.
http://www.linuxselfhelp.com/howtos/...t-HOWTO-2.html
 
1 members found this post helpful.
Old 07-11-2012, 12:48 PM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you can safely try to google yourself, there are a lot of working links out there. For example here is a nice how-to
 
1 members found this post helpful.
Old 07-11-2012, 12:49 PM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by barnac1e View Post
Thanks but that link is dead (returns a 404 error)
see this: http://www.linuxselfhelp.com/HOWTO/B...WTO/index.html
 
Old 07-11-2012, 01:03 PM   #7
Refractor
Member
 
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Debian
Posts: 91

Rep: Reputation: 25
Or just
Code:
cp /etc/profile ~/.bashrc
ln -sv /etc/profile/.bash_profile
Edit either ~/.bashrc or .bash_profile to suit your needs.
 
1 members found this post helpful.
Old 07-11-2012, 01:30 PM   #8
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: openSUSE 42.2 LEAP- KDE
Posts: 241

Original Poster
Blog Entries: 1

Rep: Reputation: 9
Thanks you guys. I got it fixed! And know I know how to add other things as well.
 
  


Reply



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
[SOLVED] How to change the login name in the shell prompt? MURIITHI P Linux - Newbie 11 04-16-2012 07:13 AM
I'd like to change the default shell prompt. lynnevan Linux - General 9 09-08-2011 08:00 AM
[SOLVED] Bash 4.1$ prompt - How to change? bassplayer69 Slackware 2 05-29-2011 08:23 AM
how do i change the current prompt in shell? prospekrisal Linux - Newbie 4 07-16-2006 10:35 AM
change the shell prompt ust Linux - Distributions 5 04-28-2005 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:16 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
Open Source Consulting | Domain Registration