Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Modifying $PATH variable in /etc/profile Post 1521 by PxT on Monday 12th of March 2001 11:17:50 AM
Old 03-12-2001
Quote:
I'm not sure why you would have /etc in your search path though?
Because some lame distributions (HP-UX for one) put binaries (or links to binaries) in /etc
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Edited Path in Profile File

Definitely a unix dummy. I edited the paths in the /etc/profile file - following the instructions on an install package. Now can't use vi, cat pg ls or any other unix commands. Guess I'm in big trouble. Path reads MANPATH=/opt/hpnp/man PATH=/opt/hpnpl/bin LD_LIBRARY_PATH=/opt/hpnp/lib ... (4 Replies)
Discussion started by: thewetch
4 Replies

2. UNIX for Dummies Questions & Answers

full path of .profile in unix

need a help, am a newbe in unix how do i locate the full path of the .profile where the environmental variable for a user is set. thanks (6 Replies)
Discussion started by: dba
6 Replies

3. UNIX for Dummies Questions & Answers

echo $PATH doesn't match $HOME/.profile

This is on a Solaris 9 box, but I feel like a noob, so I am posting here. When I echo $PATH I get a lot of duplicate paths and extra stuff I don't need. What I want is just what I set up in my home dir under .profile My login shell=/bin/bash I checked the following and there are no path... (1 Reply)
Discussion started by: Veestan
1 Replies

4. UNIX for Dummies Questions & Answers

Modifying a variable value

Hi all, how do i modify a variable's value. var1='abcd efgh ijkl mnop abcd' how do i get var2 from var1 var2=$(......) $echo var2 abcd efgh ijkl mnop i.e. i have removed a duplicate occurence. or in general how to modify a varible. thanks in advance (6 Replies)
Discussion started by: kartikkumar84@g
6 Replies

5. Shell Programming and Scripting

one liner to extract path from PATH variable

Hi, Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable? for eg: suppose the PATH is being set as follows PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4 ... (2 Replies)
Discussion started by: royalibrahim
2 Replies

6. Shell Programming and Scripting

Appending a path in user's PATH variable

Hello Folks, I want to append a path in user's PATH variable which should be available in current session. Background Numerous persons will run a utility. Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

7. UNIX for Dummies Questions & Answers

profile PATH include subdirectories

I would like to modify my .profile PATH to include all subdirectories of the directory I specify. For example, right now I have PATH=$HOME/tier1 Tier1 has a tier2 directory in it. Right now I can execute files from tier1, but not tier2. I know I can add another path with $HOME/tier1/tier2,... (1 Reply)
Discussion started by: Smed
1 Replies

8. Shell Programming and Scripting

Path a variable to sed that includes a path

Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example start="BEGIN /home/mavkoup/data" end="END" sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies

9. Ubuntu

Modifying PATH (LINUX, Ubuntu)

Hello, I'm a newbi to Unix and the last few weeks I have been trying to learn Unix through a book called Unix in 24 hours. I have tried advanced shell programming (that's what the chapter is called) today and what the excersise was all about was to create mylocate - a version of locate that is... (1 Reply)
Discussion started by: Tolmac
1 Replies

10. Shell Programming and Scripting

Adding to the end of the path in .profile

Hi there, I have the following in my path: export PATH=/usr/bin:/usr/sbin But I want to change it programmatically(for the purpose of JBoss automatic(ansible) installs) to: export PATH=/usr/bin:/usr/sbin:/usr/jdk/jdk1.8.0_60 and after that I need to insert the JAVA_HOME programmatically,... (7 Replies)
Discussion started by: hvdalsen
7 Replies
profile(4)							   File Formats 							profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 08:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy