Computing.Net > Forums > Linux > Linux Commands

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Linux Commands

Reply to Message Icon

Original Message
Name: albatros
Date: April 19, 2007 at 17:57:44 Pacific
Subject: Linux Commands
OS: win2000
CPU/Ram: PIII
Comment:

Why is it commands like ifconfig, finger,and route would not run in my path unless I preceded it with /sbin/finger, or /sbin/route etc. How do I permanently include it in my path.


Report Offensive Message For Removal


Response Number 1
Name: ernie
Date: April 19, 2007 at 21:35:01 Pacific
Reply: (edit)

These commands are not in a regular users path because they are system configuration commands. Some commands found in the /sbin/ directory must be run by the root user, so this directory is found only in the root users path.

You can add sbin to your users path by adding it to the the path statement in ~/bash_profile (~/bashrc on distributions that do not use ~/bash_profile).

HTH,

Ernie Registered Linux User 247790
ICQ 41060744


Report Offensive Follow Up For Removal

Response Number 2
Name: sillygates
Date: May 23, 2007 at 01:58:30 Pacific
Reply: (edit)

nano ~/.bashrc

(on the last line:)
export PATH=$PATH:/sbin:/usr/sbin


Josh Lange


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home








Do you have a Desktop Computer anymore?

No
Yes, but only at work
Yes, but its rarely used
Yes, and its a workhorse


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History




Data Recovery Software