Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
The Best Selling PC Migration Utility.
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Virtual Tradeshows by Ziff Davis Enterprise - A Unique Opportunity to Connect with IT Experts, Access Information, and Gain Insight on today's Technology
  #1  
Old November 21st, 2001, 07:32 AM
chinook chinook is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 262 chinook User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 58 sec
Reputation Power: 8
Adding a Directory to the PATH

I'm using Red Hat Linux 6.2, can anybody tell me how I can add a directory to the Path pls. My fingers are falling off typing full directory locations to commands!

thanks

Reply With Quote
  #2  
Old November 21st, 2001, 07:51 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 76
Send a message via AIM to Hero Zzyzzx
Coupla' things-

You can use "tab autocompletion" to complete a filename/path. Partially type something and then hit tab once (or twice on some distros, I think you can edit this) to see a list of possible completions.

If you're using bash, edit your ".bash_profile" file in your home directory and add
Code:
export PATH =$PATH:/new/path/to/add:/other/new/path


If you're not sure if you're using bash, type
Code:
echo $SHELL

and you'll see what shell you're using.

I don't remember if you need to logout and log back in for it to take effect. type
Code:
printenv |less

or just
Code:
echo $PATH

to see your path.
If you don't see your updated path you probably need to logout and back in.

If you want to make it system wide, I think you edit the /etc/skel/.bash_profile, but I don't really remember.

Sorry if I'm being too basic. Not sure where you're at with your *nix skills.

Good luck!

Last edited by Hero Zzyzzx : November 21st, 2001 at 07:55 AM.

Reply With Quote
  #3  
Old November 21st, 2001, 08:53 AM
chinook chinook is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 262 chinook User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 58 sec
Reputation Power: 8
Thanks for the reply.

I got it to work for a particular user. But I want it to work for specifically the root user, or everybody - either it doesn't matter.

The server I'm using came pre-setup by the hosting company with two root users, one of which I do not use, it is for emergency access. The other is the one accessed when you su - , how this is done I've no idea!

In the home dir of this root user there is a .tcshrc which contains a set path statment. I added the path into this, logged out etc, however it wasn't available after when I "echo $PATH"ed .

I also tried the etc/skel/ method and this ddidnt work either...

Any other ideas?

Reply With Quote
  #4  
Old November 21st, 2001, 10:37 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 76
Send a message via AIM to Hero Zzyzzx
then edit the .bash_profile (again, this is assuming you're using the bash shell. If you aren't, then it's different) of the root user.
here's how the commands might look
Code:
su
cd ~
pico .bash_profile
## Enter the stuff from above into the file

Reply With Quote
  #5  
Old November 21st, 2001, 10:39 AM
chinook chinook is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 262 chinook User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 58 sec
Reputation Power: 8
Ok,

normal users are using bash. But the root user is using tcshrc (whatever this is I have no idea!).

Any hints on what to do here?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Adding a Directory to the PATH


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway