Set configuration setting


  set <setting> <value>


Configure a static IP address for the interface "net0"

  set net0/ip
  set net0/netmask
  set net0/gateway

Configure a DNS server

  set dns

Boot system, preserving any SAN connection

  set keep-san 1

Change MAC address of interface "net0"

  ifclose net0
  set net0/mac 52:54:00:12:34:56
  ifopen net0

Clear the screen

  set esc:hex 1b            # ANSI escape character - "^["
  set cls ${esc:string}[2J  # ANSI clear screen sequence - "^[[2J"
  echo ${cls}


Set value of the specified configuration setting to the specified value.

The value will be interpreted according to the type specified as part of the setting name. For example, the command:

  set net0/ip:hex 0a:00:00:64

is equivalent to the command:

  set net0/ip:ipv4

If no type is explicitly specified, then the setting's default type will be used.

Command status

Success The configuration setting was applied successfully
Failure The configuration setting was not applied successfully

See also


You can use the config command to browse and edit settings interactively.

You can use the read command to prompt the user to enter a single setting.

Settings are generally applied immediately. For example, the command:

  set net0/ip

will immediately change the IPv4 address associated with the network interface “net0”. In some cases, further action may be required in order to apply a setting. For example, the command:

  set net0/mac 52:54:00:12:34:56

will not take effect properly until the network interface is closed and reopened. See the documentation on individual settings for further details.

Older versions of iPXE allowed ANSI escape sequences to be defined using code such as:

  set esc:hex 1b ; set cls ${esc}[2J ; echo ${cls}

This should instead be

  set esc:hex 1b ; set cls ${esc:string}[2J ; echo ${cls}
cmd/set.txt · Last modified: 2013/08/01 14:19 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL
References to "iPXE" may not be altered or removed.