How do I find out my IP address on a unix-like box?
8,786
ifconfig is usually in /sbin. Depending on what system you're running this mightn't be on your path (in particular, RedHat systems don't include this on the default path)
Try:
$ /sbin/ifconfig
If it works then that's the issue, and you should change your path via your .bashrc (or whatever shell you're using).
export PATH=$PATH:/sbin:/usr/sbin
Related videos on Youtube
Author by
Admin
Updated on September 17, 2022Comments
-
Admin over 1 year
How do I find out my IP address on a unix box? I've tried
ifconfig
but it doesn't exist on the system.
-
Adam almost 15 yearsDid you try as root? Also what OS?
-
-
Ernie almost 15 yearsThis makes the assumption that the computer is on the internet, not behind NAT, has a working DNS server configured, and a hostname. If you're on a TCP/IP network that isn't connected to the internet, then this won't work.