Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I am a real newbie.I work on MAC OSX.I have been trying to locate bash_profile to set some PATHS.I am supposed to find it in home directory..but am a=unable to do so.My programs etc are not in my Home dir..they are rather saved in /users/meenaksharora..IS this a problem?
How can i edit BASH_profile?
Type "echo $HOME" to verify your "home" directory is what you think it is. The fact you're files are being "written" to /users/meenaksharora suggests that is your real "home" directory OR something in your startup is doing a cd to that directory.
There is an /etc/bash_profile which is GLOBAL for all users meaning that anyone that logs in gets the settings there.
There is also $HOME/.bash_profile which is LOCAL for the user who logs in and is executed after the above.
Additionally there can be a $HOME/.bashrc for other settings.
Check for each of these files. Note "." at beginning of file name means it is "hidden" you have to use the -a flag of ls to see such files (e.g. ls -la will show all files including hidden ones). The file in /etc/ does NOT have a "." at the beginning of its name but the two in $HOME should.
When i do Echo $home, It gives me nothing at all.. not sure what that means.ALso i only have one bashrc file in /etc folder.there is NO bash_profile in my "home" directory...
Please tell me wat this means..
Quote:
Originally Posted by jlightner
Type "echo $HOME" to verify your "home" directory is what you think it is. The fact you're files are being "written" to /users/meenaksharora suggests that is your real "home" directory OR something in your startup is doing a cd to that directory.
There is an /etc/bash_profile which is GLOBAL for all users meaning that anyone that logs in gets the settings there.
There is also $HOME/.bash_profile which is LOCAL for the user who logs in and is executed after the above.
Additionally there can be a $HOME/.bashrc for other settings.
Check for each of these files. Note "." at beginning of file name means it is "hidden" you have to use the -a flag of ls to see such files (e.g. ls -la will show all files including hidden ones). The file in /etc/ does NOT have a "." at the beginning of its name but the two in $HOME should.
Linux is case-sensitive. $home does not equal $HOME. Run 'echo $HOME' as jlightner instructed.
If you don't have a .bash_profile then create one. Do some research on your system; you may have an example bash_provile that you can copy to ~/.bash_profile. After that, edit ~/.bash_profile to suit your needs.
If you don't have an example to copy, do some google research. You may find one.
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.