Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-03-2010, 02:03 PM   #1
LQ Newbie
Registered: May 2009
Posts: 4

Rep: Reputation: 0
adding sth. to all users' PATH variable (sudo included)


I've installed rubygems on ubuntu, but it has a known issue that the rubygems' bin/ directory is not in the PATH. I know about exporting the PATH variable, and adding it to .bashrc, but I'd like to configure it so that every user has it on his PATH, even if he tries to run it with sudo. Where should I export the PATH variable then?
Old 08-03-2010, 03:40 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,274
Blog Entries: 10

Rep: Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847
/etc/bashrc (assuming they're using bash shell)

/etc/profile (ksh)

/etc/login (csh)
Old 08-03-2010, 04:16 PM   #3
LQ Newbie
Registered: May 2009
Posts: 4

Original Poster
Rep: Reputation: 0
It didn't work for sudo. I'm on bash and on Ubuntu, if that matters. I've added to /etc/bash.bashrc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudo path variable error andrewbonney Linux - Newbie 2 05-29-2010 04:07 AM
Adding a executable file $PATH Variable ajeet@linux Solaris / OpenSolaris 3 03-18-2010 01:30 PM
Setting PATH variable for new users vhn Linux - General 3 01-30-2010 09:37 AM
Adding Java to root users PATH? infornography Linux - Newbie 5 05-26-2005 08:49 AM
Adding JavaVM to PATH variable? Crickit Linux - Software 3 05-06-2003 04:06 PM

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration