Computing.Net > Forums > Solaris > Need help of Setting PATH on solaris 8

Need help of Setting PATH on solaris 8

Reply to Message Icon

Original Message
Name: chis
Date: October 30, 2001 at 04:02:27 Pacific
Subject: Need help of Setting PATH on solaris 8
Comment:

Hi guys,
I set up Intel Solaris 8 but the gcc compiler doesn't work. I have downloaded the gcc compiler from Unix freeware and use pkgadd and it seems to be Ok but ... I now need to set the PATH. I login a root user and want to set the path, can someone please shows me how to edit the PATH...
Which file should I edit and put in the PATH I want.

Many many thanks.
chis


Report Offensive Message For Removal

Response Number 1
Name: Richard Smith
Date: October 31, 2001 at 00:20:18 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

You don't need to put it in a file:

PATH=/usr/bin:/xxx/xxx

will work for the session.

If you want your own session to have an additional PATH, the edit the .profile file in your home directory, I added this line to mine:

PATH=$HOME/bin:$HOME:$PATH

To find out what the new PATH looks like, type:

$ echo $PATH

And you will get an output like:

/export/home/richard/bin:/export/home/richard:/export/home/richard/bin:/export/home/richard:/usr/bin::/usr/dt/bin:/usr/openwin/bin:/bin:/usr/ucb


Report Offensive Follow Up For Removal

Response Number 2
Name: Chis
Date: October 31, 2001 at 04:47:16 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

Thanks Richards,

But I login as a ROOT user how can I use .profile file? I tried to look for the .profile before and I could not find it. Do I need to login as a ROOT user? Because I want to compile MySQL and PHP using gcc. I read the MySQL document and it said I need a ROOT user to compile and install it.

Any more help will be greatful.

Thanks Richard and forum host and users.

Chis.


Report Offensive Follow Up For Removal

Response Number 3
Name: Richard
Date: October 31, 2001 at 08:22:44 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

You probably need to write a file named .profile. Look for .dtprofile in the ROOT user home directory and view that. There's a lot of information in there that will help.


I don't usually recomment doing any work logged in as ROOT - better to log in as your user ID, then su to root as and if you need to. Safer that way!


Report Offensive Follow Up For Removal

Response Number 4
Name: Jo
Date: November 1, 2001 at 06:25:06 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

You can also make changes to PATH in /etc/profile -- this file is run before the .profile of anyone that logs in.

A word of caution: Putting $HOME first in PATH reduces the security of your machine -- if someone is able to get into your $HOME directory, they will be able to put executables in your directory that you will run without knowing that you're running them. For instance, I could write a new version of "ls" that will somehow damage your system (such as "rm -r *"), put it in your $HOME, and then, next time you run "ls", you will erase everything in your $HOME directory instead of listing contents of a directory. It's a good idea not to put $HOME anywhere in PATH.

Hope this helps!


Report Offensive Follow Up For Removal

Response Number 5
Name: chis
Date: November 4, 2001 at 03:16:38 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

Thank you Richard and Jo for your input. I will try it latter.

Thanks.
Chis


Report Offensive Follow Up For Removal


Response Number 6
Name: Ravi C
Date: November 5, 2001 at 00:26:11 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

PATH=/usr/sbin:/usr/bin:/usr/local/bin:/opt/gnome-1.4/bin:/usr/ccs/bin
LD_LIBRARY_PATH=/opt/gnome-1.4/lib

export LOGNAME PATH LD_LIBRARY_PATH


I had to change my path in /etc/profile to that to get gcc to work properly. Plus you might need autoconf/m4 and make installed also. The LD_library is for the GTK libraries. I switched out Gnome (beta) for CDE. So now I can just compile gaim or xchat or whatever else you want.


Report Offensive Follow Up For Removal

Response Number 7
Name: swamy
Date: January 25, 2002 at 01:55:30 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

Hi,

I have down loaded GCC compiler for solaris 8.0.
when i compile it say stdio_iso.h file missing but in the header file it is present.
please suggest me how do i move forward.

Regards,

Swamy


Report Offensive Follow Up For Removal

Response Number 8
Name: Phil
Date: March 8, 2002 at 08:40:00 Pacific
Subject: Need help of Setting PATH on solaris 8
Reply: (edit)

I've also been having some issues with setting of the path. Wierd thing, I use to use the default shell for root, and recently changed it to bash. It seems now, when I log into CDE my path is not set properly (from /etc/profile). But when I login through telnet, no problem good path. Any ideas?


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Need help of Setting PATH on solaris 8

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software