- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Use of /etc/PATH, /etc/profile, etc.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 10:55 PM
07-04-2005 10:55 PM
What's the use of /etc/PATH, /etc/profile, etc.
Because PATH variable and .profiles are different for each user.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:13 PM
07-04-2005 11:13 PM
Re: Use of /etc/PATH, /etc/profile, etc.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:23 PM
07-04-2005 11:23 PM
Re: Use of /etc/PATH, /etc/profile, etc.
That means if we have
Path=/usr/bin
Then setting in independent .profiles like
Path=/usr/sbin
will contain both or do we have to do
Path=$Path;/usr/sbin
Do we have some other things like these.
Is there anything similar in Solaris?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:23 PM
07-04-2005 11:23 PM
Re: Use of /etc/PATH, /etc/profile, etc.
/etc/profile contains global environment settings for the users. individual users' settings are defined in .profile at their home directory.
/etc/PATH is define in /etc/profile.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:30 PM
07-04-2005 11:30 PM
Re: Use of /etc/PATH, /etc/profile, etc.
Setting enviroment works the same on Solaris. Please note thet there also may be other files with enviroment settings depending on user shell and login method (e.g. .login and .dtprofile).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:35 PM
07-04-2005 11:35 PM
Re: Use of /etc/PATH, /etc/profile, etc.
I tried removing the .profile of my login and logged in again and tried to echo $PATH. The output is as expected. It shows only the path specified in /etc/PATH
During login
First /etc/PATH is taken
Second if u want any other gloabl path(common to all users)mention it in /etc/profile
Third if u want any specific path to that user mention it in that users $HOME/.profile
So execution is like
/etc/PATH
/etc/profile
/home/
regards
CS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:43 PM
07-04-2005 11:43 PM
Re: Use of /etc/PATH, /etc/profile, etc.
PATH=$PATH:/usr/sbin
This would yield /usr/bin:/usr/sbin
If, on the other hand, the previous contents are ignored, only what you specify will remain:
PATH=/usr/sbin
This would yield just /usr/sbin.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2005 11:48 PM
07-04-2005 11:48 PM
Solution/etc/PATH contains directory locations where well-known binaries are seached while execution. which, whereis are working based on /etc/PATH file contents. It is like, find
Execution is like,
login (deamon)
|
/etc/profile
|
$HOME/.profile
/etc/PATH will be executed in /etc/profile itself.
hth.