LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .profileand .lobin (https://www.linuxquestions.org/questions/linux-newbie-8/profileand-lobin-4175470282/)

fereshteh 07-20-2013 02:48 AM

.profileand .lobin
 
hi
i am roms user. in this model manual write that
Quote:

If you are always going to be using the same compiler on each system, you can edit your .profile or .login files to globally set them.
my system shell is bash and i use fedora 16.
would you please tell me that where i should edit (where is .profile and .login)
thanks

fbsduser 07-20-2013 03:15 AM

Quote:

Originally Posted by fereshteh (Post 4993626)
hi
i am roms user. in this model manual write that

my system shell is bash and i use fedora 16.
would you please tell me that where i should edit (where is .profile and .login)
thanks

you need to copy them from /etc to your home folder (/etc/login to /home/roms/.login and /etc/profile to /home/roms/.profile)
And then edit the copies in your home folder.

fereshteh 07-20-2013 03:51 AM

dear
i check /etc there are not .profile and .login. there are some files such as zlogin, profile (with out dot),
but i have .bash_profile in home directory.
actually in roms manual say that
Quote:

to provide the location for the NetCDF files (and optional HDF5 library). One is by editing the corresponding lines in your system-compiler file. Another way is through the Unix environment variables. If you are always going to be using the same compiler on each system, you can edit your .profile or .login files to globally set them one way is through the Unix environment variables . Here is an example for ksh/bash:
Quote:

export NETCDF_INCDIR=/usr/local/netcdf4/include
export NETCDF_LIBDIR=/usr/local/netcdf4/lib
export HDF5_LIBDIR=/usr/local/hdf5/lib
now i am not sure that i should add these path ro ./bashrs or ./bash_profile or ..

btmiller 07-21-2013 04:06 PM

The .profile and .login files are for older versions of the Bourne shell. IIRC, bash will still read them for compatibility reasons, but the "new way" with bash is to source ~/.bash_profile for login shells and ~/.bashrc for non-login shells. What I like to do is just have my .bash_profile source my .bashrc, so I get the same behavior for both login and non-login shells.

You can put the export statements to .bashrc and then have .bash_profile source .bashrc, as I like to do, and it will do what you want.

You should probably check out the bash documentation for more information about shell start-up.

fereshteh 07-22-2013 02:16 AM

thank so much for your good reply


All times are GMT -5. The time now is 11:38 PM.