Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
your PS1 variable is in ~/.bashrc you can change the variable using your favorite editor and the issue a ". bashrc" to load your new config file into the current session.
can you post what is in your ~/.bashrc
also if in the terminal session where you changed the PS1 var try issuing a . ~/.bashrc and see if the prompt changes to something other than what you set it to.
What linux and version are you using? In some you have to edit the ~/.profile file - depending on what your shell is set to.
sh-2.05b$ echo $SHELL
/bin/sh
I am using a slackware base verison (collegelinux)
sh-2.05b$ cat .bashrc
sh-2.05b$ export PS1="\e[32;1mPaxmaster>\e[31;1m"
this works but when i try to exit from aterm then enter to aterm the setting is gone
sh-2.05$ cat .bash_profile
source ~/.bashrc
I am using fluxbox as my x window
also when i want to beconme su the prompt don't become # it stay like this paxmaster>
how should i know when i am root or when i am a user
I don't know what's wrong with my shell as u can it is a /bin/sh
Earlier versions of Linux (7.1 redhat for instance) needed to make PS1 changes in /etc/bashrc - which got executed before the individual file. So you may try it.
yea and i printed the pages. it was great quite usefull
the problem was the /etc/bash_profile the program wasn't looking at my home ~/.bashrc nor ~/.bash_profile, it was overriding by home dir
mean while i type the PS1 in my /etc.. and it works, but soon i will write a program that will frist look in the home dir if is has a bashrc it will use that instead in my /etc place thanks guys for the help
the link u provide (statmobile) I got another idea
"\e]2;titlebar\a" but this don't work for me some reason at least my prompt color is working, -
It dynamically updates the titlebar. I'm not sure if you replaced the text 'titlebar' that you referred to, so I just thought I would give you my prompt code.
Last edited by statmobile; 07-22-2004 at 04:08 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.