*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
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.
I noticed on one of our linux servers someone had a custom prompt which basically included the current directory, which sort-of elliminated the need to use the pwd command to see where you were.
I would I change the default prompt in FreeBSD 4.10 for the BASH shell to do this ?
The sh shell doesn't give a path of the current directory without some fancy tricks. I leave root as sh and mine as bash. I think root should be crude to so you won't get in the habit of using it. If you need root much, setup sudo.
To change your shell to bash,,,, as root;
# chsh <user>
Change the shell to /usr/local/bin/bash
You'll be in the vi editor, so knowing some commands wouldn't hurt. You could change the /etc/passwd file. I just don't do it that way.
First...you have posted to several of my questions, thanks.
Two...I was able to change the shell to bash. Took a little reading, but got is going.
Now for S&G (sh*ts-n-giggles), I was interested in knowing how to change the prompt display. This is not pressing. I am working on several other things. I just thought it was pretty cool and conveinent.
nixcraft gave you the standard prompt setting and a pretty good link to other neat stuff.
To find my prompt quickly, mainly when scrolling up through a long output, I have a color prompt. Just a little color to a boring screen. Below is in my /etc/profile. In all user's .bashrc and .bash_profile I have an entry;
source /etc/profile
that picks up the /etc/profile stuff. You can get bash to do lots of things. Have fun!
PS1USER="\[\033[0;36m\]\u@\h\[\033[0m\]\w\[\033[1;33m\]\[\033[0m\]"
case `id -u` in
0) PS1="`whoami`# ";;
*) PS1="${PS1USER}$ ";;
esac
Similar to all this - is there a way to make OpenBSD/FreeBSD to use green text? Thus, black background and green text? I just find it easier to read after many hours of staring at the consoles.
I followed the link given by Genesee and noticed the colour settings - does this enable me to change the colour of the standard text or just the prompt?
Yes, please someone explain how to change the actual console text (not just the prompt) color. I've been trying to exactly this same thing and am going nuts trying different things and searching the web.
I thought I should let you know that I found this: (Have only tested it with FreeBSD so far).
If I add the line:
allscreens_flags="green black"
to my /etc/rc.conf and reboot - the system will come back up with green text on a black background. Haven't experimented with any other colour options as yet.
Gsee
edit: I just tested this on my OpenBSD box and it doesn't seem to work - Still definitely works with FreeBSD however.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.