What command do I want to issue when I want to know the IP address of the Solaris machine I'm logged onto?
Thanks in advance for any suggestions.
--James
What command do I want to issue when I want to know the IP address of the Solaris machine I'm logged onto?
Thanks in advance for any suggestions.
--James
If you're a normal user (i.e., not 'root') ifconfig
isn't in your path, but it's the command you want.
More specifically: /usr/sbin/ifconfig -a
/usr/sbin/host `hostname`
should do the trick. Bear in mind that it's a pretty common configuration for a solaris box to have several IP addresses, though, in which case
/usr/sbin/ifconfig -a inet | awk '/inet/ {print $2}'
will list them all
hostname and uname will give you the name of the host. Then use nslookup to translate that to an IP address.