====== Set configuration setting ====== ===== Synopsis ===== set ===== Examples ===== === Configure a static IP address for the interface "net0" === set net0/ip 192.168.0.100 set net0/netmask 255.255.255.0 set net0/gateway 192.168.0.1 === Configure a DNS server === set dns 192.168.0.1 === Boot system, preserving any SAN connection === set keep-san 1 autoboot === 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} ===== Description ===== Set value of the specified configuration [[:settings|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 10.0.0.100 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 ===== * ''[[:cmd:show]]'' * ''[[:cmd:clear]]'' * ''[[:cmd:read]]'' * ''[[:cmd:inc]]'' * ''[[:cmd:config]]'' * [[:cfg|List of all iPXE settings]] * [[:cmd|List of all iPXE commands]] ===== Notes ===== You can use the ''[[:cmd:config]]'' command to browse and edit settings interactively. You can use the ''[[:cmd:read]]'' command to prompt the user to enter a single setting. Settings are generally applied immediately. For example, the command: set net0/ip 192.168.0.1 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 [[:cfg|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}