--- title: "system.device.setDeviceHostname" description: "Changes the hostname of a device. Used for all ethernet based drivers." --- # system.device.setDeviceHostname > Changes the hostname of a device. Used for all ethernet based drivers. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions [Permission Type](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties): Device Management Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope. ## Syntax `system.device.setDeviceHostname(deviceName, hostname)` ### Parameters Type | Parameter | Description ------- | ------- | ----- String| `deviceName` | The name of the device in Ignition. String| `hostname` | The new IP address or hostname. ### Returns Nothing ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Example 1" # Set Hostname: system.device.setDeviceHostname("CLX", "10.10.1.20") ```