add PATH as root


 
Thread Tools Search this Thread
Operating Systems Solaris add PATH as root
# 1  
Old 09-06-2011
add PATH as root

Sorry this maybe a dumb one, but I am root and want to add something to my PATH.

Is the right place to do it here:
/usr/dt/config/dtspcdenv ?

If so, after I add it, how do I source it? Neither
"source <file>" nor ". <file>" work.

How does the above file work... is there another place to put it?
# 2  
Old 09-07-2011
do you mean this:
Code:
PATH=$PATH:/my/path/here export PATH

# 3  
Old 09-07-2011
No, I mean what file do you put that in (as root)?

And how do you invoke it after (without re-logging in).
# 4  
Old 09-07-2011
use the ".profile" in roots home directory. or /etc/profile for a system wide setting...
This User Gave Thanks to DukeNuke2 For This Post:
# 5  
Old 09-07-2011
or set the SUPATH variable in /etc/default/login & /etc/default/su
This User Gave Thanks to jlliagre For This Post:
# 6  
Old 09-08-2011
to invoke it again if you place it in your .bashrc or .kshrc depending on what shell you use you can just open a new shell
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to add path to root user

I am trying to add path for root. In /etc directory there is no .bash_profile file it has only profile file can any one say how to add path for root user ? is it possible to add path in profile file for root user. (18 Replies)
Discussion started by: elango963
18 Replies

2. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

3. Shell Programming and Scripting

add path variable permanently

Hi, I have added the path variable as below export... (4 Replies)
Discussion started by: burton
4 Replies

4. Shell Programming and Scripting

how to add a path variable

Hi, I tried to add a path vairable export GPLOAD_CONNECT_STR= -U crm -h sdc-gp1-dev1 -d wmgpdev but it throws the below error -bash: export: `-U': not a valid identifier -bash: export: `-h': not a valid identifier -bash: export: `sdc-gp1-dev1': not a valid identifier -bash: export:... (2 Replies)
Discussion started by: burton
2 Replies

5. Solaris

Non-Root mode ... luxadm to show path(s) for Disks

Hi Gurus out there... I am pondering over a situation where I have non-root access (user account), where I am trying to determine paths (including multipaths) on a host. "luxadm display" seems very appropriate, but requires root access. Is there anyway I can get the FC path information? ... (1 Reply)
Discussion started by: verisund
1 Replies

6. UNIX for Dummies Questions & Answers

how to find a path within unix root directory

I need to know whether nyfile/mypath exists on the file system in the root directory. How to do this (1 Reply)
Discussion started by: ramky79
1 Replies

7. Solaris

How to add new paths to $PATH

Hi all, I downloaded a tarball of coreutils .... extracted only to find out that i had to build it... But when i executed ./configure, this is what i got checking build system type... i386-pc-solaris2.11 checking host system type... i386-pc-solaris2.11 configure: autobuild project... GNU... (2 Replies)
Discussion started by: wrapster
2 Replies

8. UNIX for Dummies Questions & Answers

mistyped shell path, now i can't login as the only user that can su to root

i mistyped the location of bash and now i can't login as the only other user who belongs to wheel on my freebsd box. since i'm having many problems with samba, this has frozen my attempts to get things resolved with the former issue. i've been told that 'su -m' should do the trick, but it's... (3 Replies)
Discussion started by: xyyz
3 Replies

9. UNIX for Dummies Questions & Answers

how to add cc path

hello , when i am deploying a server software , i am getting this error: checking for gcc... no checking for cc... no configure: error: no acceptable cc found in $PATH can any body help , how to correct this. , i have shown my path statement. # echo $PATH... (6 Replies)
Discussion started by: definate
6 Replies
Login or Register to Ask a Question