[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Determining IP address of my pc (dial up and/or cable modem)



ifconfig ppp0 | grep 'inet addr:' | sed 's/.*inet addr:\([0-9.]*\).*/\1/g'

If your connection is via ethernet, just swap ppp0 above with eth0 or eth1
or whatever. The above will return just the ip address. For more general
information on your interfaces, just use ifconfig.



Reply to: