Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
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.
You can put them in /etc/profile so they are available to anyone who logs in that machine, or in your ~/.dtprofile to be available only for you.
the file "/etc/profile" seems a bit complicated to me. What would be the syntax for $PATH and $LD_LIBRARY_PATH ? And where should I write it in the file?
Hi,
I managed to permanently change the PATH variable. However LD_LIBRARY_PATH resist any change. Can anybody explain to me why?
How can one define a env variable since it seems D_LIBRARY_PATH is not define by default?
Thanks in advance for your help,
Fabian.
However LD_LIBRARY_PATH resist any change. Can anybody explain to me why?
How did you set it up? I would suggest adding the LD_LIBRARY_PATH line to the shell initialization file (eg., ~/.cshrc for csh).
Quote:
How can one define a env variable since it seems LD_LIBRARY_PATH is not define by default?
At the process startup, run-time linker will check if LD_LIBRARY_PATH is set. If it is set, it will start searching the directories specified in LD_LIBRARY_PATH from left to right, until it either binds the symbol, or it runs out of directories to search for the symbol. If LD_LIBRARY_PATH has not been set, it will just search in the default paths ie., /usr/lib for 32-bit processes, and /usr/lib/64 for 64-bit applications.
So, you need not worry about LD_LIBRARY_PATH not being set, by default. Run-time linker (/usr/lib/ld.so.1) is aware of this env variable.
More correct way is
PATH=$PATH:/new/directory:/another/directory:.
Note the "." at the end
. stands for the current directory
If u don't have the "." , to run an executable file (say a.out) in your current directory, u have to give ./a.out instead of a.out
Last edited by AbrahamJose; 02-16-2006 at 03:37 AM.
well actually the default shell ist ksh but as soon as I'm logged in, I changed manually to bash because I miss the tabb function.
What is it so bas about bash? What would you advice?
$PATH works with normal user under all shells, but with root it doesn't work nowhere.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by xpucto
well actually the default shell ist ksh but as soon as I'm logged in, I changed manually to bash because I miss the tabb function.
I know, actually ksh93 has this feature, but is not yet integrated in Solaris (you can download it from its site though).
There is a work in progress to have it in Solaris: http://www.opensolaris.org/jive/cate...?categoryID=53
Quote:
What is it so bas about bash?
Nothing particular, I prefer ksh but this is a lot a metter of taste and features I'm missing in bash, or behaviour I'm not used to.
Quote:
What would you advice?
No problem for you staying with bash.
Quote:
$PATH works with normal user under all shells, but with root it doesn't work nowhere.
Can you elaborate on that, there is no reason for PATH to have a different behaviour with root.
Can you elaborate on that, there is no reason for PATH to have a different behaviour with root.
Well, I logg in through SSH as normal user. This user as the full PATH (with all variables), when I changed the shell, the user still have the correct PATH. When I do "su" and work as root, it doesn't have the corrected PATH no matter under which shell I'm working on.
Hier is my /etc/profile if it can help:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.