Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-11-2003, 06:10 AM   #1
LQ Newbie
Registered: Jul 2003
Location: Suburbia
Distribution: Slackware
Posts: 26

Rep: Reputation: 15
Bash Prompts with xterm-style terminals

Hey guys, I was wondering where the configuration file for the terminal emulators was. More specifically, I've been trying to change the bash prompt to the usual

<hostname@machine> $:

However, when using Konsole, eterm, or the default GNOME one, it's just the bash version. Using Konsole, when I installed kde from the Slack9 packages, it used the h@m format by default. Now that I compiled 3.1.3, it's back to the usual bash version prompt.

Another thing, when I su - for root, the bash version changes to the "correct" prompt, then when I exit from that it goes back to being the bash version.

Which file to I edit? The one for the Konsole is the more important one since I've been trying out kde lately. I read the bash-prompt HOWTO, but it only talks about /etc/profile. As far as I know, this only works for the actual linux terminal (I also read through it and it sets the prompt as h@m.. etc as I thought). Anyways thanks for the help as always.
Old 09-11-2003, 09:43 AM   #2
Registered: Aug 2003
Location: .bh
Distribution: Gentoo
Posts: 188

Rep: Reputation: 30
add this to your ~/.bashrc:

PS1="<\u@\h> $: "

if there is no .bashrc in your home dir, just create one and the line to it.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
which distro for GUI lover (i hate cmd lines, terminals, prompts, etc...) bencpht Linux - Distributions 23 05-26-2006 10:19 PM
xterm start with sh instead of bash freeindy Linux - Software 4 04-25-2004 11:58 AM
Newbie questions:Bash Prompts newinlinux Linux - Newbie 9 03-10-2004 07:15 PM
Difference between bash and xterm krackerroot Red Hat 4 09-08-2003 11:32 AM
KDE 3.1.1 made terminals use bash as default? red1busta Linux - Newbie 2 03-29-2003 12:39 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:33 AM.

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