Results 11 to 17 of 17
No, use the existing one. You should keep the sourcing of /etc/bashrc....
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-17-2005 #11Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
No, use the existing one. You should keep the sourcing of /etc/bashrc.
- 09-17-2005 #12Why that? He can just create empty .bashrc file in home dir, if not exists and add export command there. Ain't that true?
Originally Posted by scm
- 09-18-2005 #13Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
If he's happy to miss out on everything that /etc/bashrc sets up, yes. I'd advise including it, personally.
- 09-18-2005 #14Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
If he's happy to miss out on everything that /etc/bashrc sets up, yes. I'd advise including it, personally.
Ah, I've just noticed satimis says he doesn't have a .bashrc file (how did that happen?). The supplied one (on FC2) looks like
Do you have /etc/bashrc, satimis?Code:# .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi
- 09-18-2005 #15
He may have /etc/basrch file, but I'm talking about .bashrc in home dir "/home/satmis/.bashrc". This file may exist or not, but you can create it and include your export commands there.
- 09-19-2005 #16Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
Hi folks,
Tks for your advice.
bash-3.00$ ls -l /etc/bashrcbash-3.00$ cat /etc/bashrcCode:-rw-r--r-- 1 root root 998 Aug 19 21:06 /etc/bashrc
bash-3.00$ ls -al /home/satimis/ | grep .bashrcCode:# Begin /etc/bashrc # Written for Beyond Linux From Scratch # by James Robertson <jameswrobertson@earthlink.net> # updated by Bruce Dubbs <bdubbs@linuxfromscratch.org> # Make sure that the terminal is set up properly for each shel if [ -f /etc/profile.d/tinker-term.sh ]; then source /etc/profile.d/tinker-term.sh fi # System wide aliases and functions. # System wide environment variables and startup programs should go into # /etc/profile. Personal environment variables and startup programs # should go into ~/.bash_profile. Personal aliases and functions should # go into ~/.bashrc # Provides a colored /bin/ls command. Used in conjunction with code in # /etc/profile. alias ls='ls --color=auto' # Provides prompt for non-login shells, specifically shells started # in the X environment. [Review the LFS archive thread titled # PS1 Environment Variable for a great case study behind this script # addendum.] #export PS1="[\u@\h \w]\\$ " export PS1='\u@\h:\w\$ ' # End /etc/bashrc
(No printout)
bash-3.00$ ls -al /home/satimis/.bash*I can create /home/satimis/.bashrc. What will be its content? Only one line file?Code:-rw------- 1 satimis satimis 22191 Sep 19 18:31 /home/satimis/.bash_history
Or copy /root/.bashrc on it?
B.R.
satimis
- 09-19-2005 #17Yes, yes, yes you can! Yes you can create empty file and add one line to it as follows
Originally Posted by satimis to add "/my/path" to existing PATH variable orCode:export PATH=$PATH:/my/path
to completely replace PATH with /my/path. Oh yes, the file must be named ".bashrc" and must be placed in your home dir (I hope it is /home/satimis). You can do it, now do it!Code:export PATH=/my/path


Reply With Quote
