Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-13-2007, 09:37 PM   #1
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Rep: Reputation: 37
How to ensure paths are set during boot

Hello all,

Using Fedora Core 6 at present, but I suppose the answer to this question will apply to many distros.

How does one configure 'paths' so that the desired 'paths' are configured during the boot process?

For instance, when I am root, I always have to type '/sbin/ifconfig' which is annoying. I would like to just type 'ifconfig'

So how do I set /sbin as a default 'path' for linux to look into for the commands I type, during boot up?

Old 04-13-2007, 10:19 PM   #2
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
I edited /etc/profile and added "pathmunge /sbin", so the end of the /etc/profile file looks like this:

 pathmunge /sbin
unset i
unset pathmunge
It solved my immediate frustration, but I am wondering if this is good practice?

Old 04-13-2007, 11:41 PM   #3
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
With a few exceptions all the commands in /sbin must be run as root. Ifconfig happens to have one function that can be run as user: Ifconfig with no parameters gives interface info. If there is a program you want to run as user, but it isn't in the user's PATH you do this:

#ifconfig file for normal users

in a text editor. Make it exectutable:

chmod a+x <filenameofscript>

and then, from whatever directory the file is in:


will run /sbin/ifconfig.
Old 04-14-2007, 12:47 AM   #4
LQ Guru
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The easiest is to add the following line to /root/.bashrc or /root/.profile.


If you use su - to substitute user for root, then you will not be in this problem. Both Redhat and Fedora have the same issue.


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
can't boot linux knoppix from cd - setting paths errors mam1 Linux - Newbie 6 12-01-2006 05:14 AM
how do you alter/ add to paths set on startup? PaleViper Linux - Newbie 4 10-08-2004 01:55 PM
How do you set up links or paths in LINUX? Mandrake 9.2 Java VM Ygarl Linux - Newbie 4 03-29-2004 03:00 PM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 10:15 PM
how to ensure only one record exist with the same name. meluser Programming 5 03-18-2003 02:12 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 PM.

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