You are not logged in.
Hi,
I got up this morning (err...afternoon) to find that my netcfg2 command resulted in "command not found" etc. After some looking around, i saw that my $PATH variable had only a few entries, and was ended with a "." I've added a few back, but I want to know what caused this and how I can fix it. Also, I added some stuff like /usr/bin, /usr/sbin, but I can't find where ifconfig lives. Can someone let me know, or better yet give me a command to find it (looking for a file named x and printing out the path(s)). Thank you
Last edited by underpenguin (2008-01-11 05:12:16)
Offline
ifconfig is in /sbin. You can find it with "find / -name ifconfig", although there might be a better way. Finding stuff from / can take a while.
Offline
$ sudo updatedb
$ locate ifconfig
Offline
Thanks,
Anyone know what caused the problem / permanent solution besides adding & exporting to PATH every time I boot?
Offline
look in your ~/.bashrc ~/.bash_profile to see if any of those are setting your path
Offline
To find executables, there's also "whereis ifconfig"
Offline
Offline
I may have, is there supposed to be a file called /etc/profile ? I have a folder /etc/profile.d/ and a /etc/bash.profile Can someone post theirs so i have something to work off of if this indeed is the problem?
Thank you
Offline
Contents of my /etc/profile
#
# /etc/profile
#
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"
export MANPATH="/usr/man:/usr/X11R6/man"
export LESSCHARSET="latin1"
export INPUTRC="/etc/inputrc"
export LESS="-R"
export LC_COLLATE="C"
export COLUMNS LINES
export PS1='[\u@\h \W]\$ '
export PS2='> '
umask 022
if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" -o "$TERM" = "xterm-xfree86" ]; then
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
fi
# load profiles from /etc/profile.d
# (to disable a profile, just remove execute permission on it)
if [ `ls -A1 /etc/profile.d/ | wc -l` -gt 0 ]; then
for profile in /etc/profile.d/*.sh; do
if [ -x $profile ]; then
. $profile
fi
done
unset profile
fi
#End of File
"Unix is basically a simple operating system, but you have to be a genius to understand the simplicity." (Dennis Ritchie)
Offline
Thanks very much synorgy for your profile and phrakture for your (as usual) uncanny ability to fix everything. [SOLVED]!
Offline