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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-16-2004, 05:26 PM
|
#1
|
|
Member
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82
Rep:
|
~/.bashrc, ~/.bash_profile
I keep finding suggestions to put things in my .bashrc or .bash_profile files, located conveniently in my home directory. Problem is, neither of them are there.
And yes, I did ls -a, I'm not THAT much of a newbie.... I've got .bash_history, and .kderc, and other such goodies, but not those two bash config files.
Is this an oddity of Slackware (ie they are stored somewhere else) or do they simply not exist until I create them? If I do create them, what should they contain? Are they shell scripts? Do I make them executable?
Thanks for any help!
|
|
|
|
08-16-2004, 05:32 PM
|
#2
|
|
Member
Registered: Jan 2003
Distribution: Gentoo
Posts: 65
Rep:
|
You can simply create them. They are not shell scripts and they do not have to be executable.
Here are mine from a server at work:
[#####@asahel #####]$ cat .bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
[#####@asahel #####]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
CVSROOT=/usr/local/cvsroot/#####
export CVSROOT
export PATH
unset USERNAME
|
|
|
|
08-16-2004, 05:36 PM
|
#3
|
|
Member
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82
Original Poster
Rep:
|
Excellent! Thanks!
|
|
|
|
08-16-2004, 05:43 PM
|
#4
|
|
Member
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82
Original Poster
Rep:
|
A thought.... something I'd like to put in there but I'm not quite sure how....
Currently my command line looks like this:
sinope@chaos:~$
Argh! Too much information, I know who I am and what host I'm on, since there's only one user and one host! All I want to see is
$
or perhaps
~$
How do I set that up? Thanks again....
|
|
|
|
08-16-2004, 06:41 PM
|
#5
|
|
Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796
Rep:
|
export PS1='\w\$'
Last edited by Demonbane; 08-16-2004 at 06:45 PM.
|
|
|
|
08-16-2004, 10:17 PM
|
#6
|
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,816
Rep: 
|
Also, if running slackware, beware that by default new users are often given /bin/sh for their shell instead of /bin/bash. /bin/sh is just a symlink to /bin/bash (or vice versa), but if bash is invoked as sh it will behave slightly differently, including not reading the .bash_* startup files. You should chsh your shell to bash. I always do when running slackware. The syntax is chsh -s /bin/bash. You can see how bash has been invoked by typing echo $SHELL on the command prompt (to see if this in necessary).
|
|
|
|
08-17-2004, 02:40 AM
|
#7
|
|
Member
Registered: Aug 2004
Location: Chicago
Distribution: Debian testing/unstable
Posts: 82
Original Poster
Rep:
|
Thanks Demonbane. btmiller: thanks, that took me forever to figure out, but I already did that.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:02 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.
|
Latest Threads
LQ News
|
|