File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting up profile

 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I thought /etc/profile was the best way to setup environment variables. But when I do this, it seems like that .bash_profile is still the one being used. How can I set environment variables so that it is widely used by any user in the system? Thanks!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
way 1)



way 2)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17622
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's actually a whole chain of profiles and it varies somewhat between distros. /etc/profile is likely the one you want for global stuff; the .bash_profile in the user's home directory is executed when they login using bash as their initial shell (or "su" a new shell session), so you'd have to replicate things for each user. There's probably a global /etc/bash_profile as well for all bash users.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic