Easy question: How to add/modify the path?
You know, when you do 'which something', and get 'no something in yadda, yadda, yadda'.
How do I add additional directories to be searched in that yadda? Slack 13.1. Thanks. |
Tried the answer I found in Google:
PATH=$PATH:/usr/local/rvm/bin But that didn't seem to do it. |
On the command line you need to do:
Code:
export PATH=$PATH:<whatever> Alex Brinister |
Quote:
|
There is one in your home dir and in /etc/bash.bashrc. I would recommend only editing your own unless you want it system-wide.
Alex Brinister |
If I'm logged in as root, should I have a .bashrc in my ~?
And if one isn't there (I did an 'ls -a', and the only bash thing is .bash-history). Am I missing something, or can I just create the .bashrc file with just the export line? |
You can just create the file. It does not exist by default in Slackware but it will work if available. I may be mistaken but I don't think /etc/bashrc (or /etc/bash.bashrc) will work system-wide, since that is not a bash feature (most distros ship a .bashrc in /etc/skel that references /etc/bashrc that gets copied to a new user's home directory).
|
Really? I'm running Arch:
Code:
[fluffypony@0xffeDAEMONPAWNY1969 ~]$ ls /etc/ | grep bash Code:
[fluffypony@0xffeDAEMONPAWNY1969 ~]$ cat /etc/bash.bashrc Code:
[fluffypony@0xffeDAEMONPAWNY1969 ~]$ cat ./.bashrc Alex Brinister |
^ He's not saying the file isn't there, but that isn't typically run for every bash instance on the system, but used as a template for new user accounts initial bashrc if there is one.
Or that was what I understood from it edit: nvm, didn't read the above closely enough |
http://forums.offtopic.com/images/smilies/wavey.gif
Thanks! edit: aww c'mon, what kind of a board doesn't allow img code??? |
Quote:
It is non-standard. Arch adds a (non-standard) system bashrc at compile-time: Code:
_bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin\"\' |
I see. Thanks!
Getting back on topic, reading this page I realize the difference between bashrc and bash_profile. I would try both to see what suits you. Alex Brinister |
Quote:
|
All times are GMT -5. The time now is 04:34 PM. |