# The Ubuntu Forum Community > Ubuntu Official Flavours Support > New to Ubuntu > [ubuntu] Change IP from Static to DHCP using ifconfig

## Zeke501

Hi

I used the command "sudo ifconfig eth0 x.x.x.x netmask x.x.x.x" to change my dhcp ip address temporarily. 
I was wondering if there was a command to change this back to DHCP without having to reboot my pc?

Thanking you in advance

----------


## HermanAB

Howdy,

It is not an ifconfig function.

To refresh your DHCP address you have to run a DHCP client:
$ sudo dhclient eth0

----------


## Zeke501

Hi Herman

Thank you so much for the quick response, that works perfectly

----------

