PDA

View Full Version : IP conmmand



NeoGreen
10th May 2006, 01:51 AM
What is the command to see what IP address is. I tried ifconfig but it isn't working. :(

Mat
10th May 2006, 01:55 AM
try /sbin/ifconfig



Mat

NeoGreen
10th May 2006, 02:00 AM
Why di d I have to use /sbin/ifconfig instead of just ifconfig? Did something change. thanks for the help :)

Mat
10th May 2006, 02:53 AM
that's because of the way you used su..

if you just use "su" <Return>, you will become root but the environment variables of the user that issued the "su" remain.. By default, a user's path does not include /sbin and thus you can't type ifconfig directly.

however, if you use "su -" <Return>, all environment variables will be taken from the root account and you will have a path variable that includes /sbin.. in this case, just typing ifconfig is sufficient

you'll find more (better?) information at "man su"



Mat

NeoGreen
10th May 2006, 02:57 AM
Thanks for the information. :)

icydog
10th May 2006, 05:50 AM
You don't need to be root to run ifconfig though. You can just do /sbin/ifconfig from a normal user account if you just want to check your IP.