$MachineAddresses

$MachineAddresses
gives a list of strings specifying the current IP addresses associated with the computer on which the Wolfram System is being run.

DetailsDetails

  • $MachineAddresses gives if no network address is defined, so that the computer is effectively "off line".
  • $MachineAddresses will typically give a list with one element for each network adapter on your computer.
  • If a network configuration is changed, the value of $MachineAddresses may change during the course of a single Wolfram System session.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

List the IP address associated with each connected network adapter:

In[1]:=
Click for copyable input
Out[1]=

Disconnecting an adapter will remove its entry from the list:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2007
(6.0)
Translate this page: