Renew DHCP Lease on Ubuntu VM After Moving Between Wireless Networks


sudo dhclient -r [eth0] && sudo dhclient [eth0]

I add that command as an alias to my ~/.bashrc file

alias resetdhcp='sudo dhclient -r eth0 && sudo dhclient eth0'

then resourced it so I could use it in the bash session I was in

source ~/.bashrc

I constantly have my Ubuntu VM (VirtualBox) running on my Windows laptop and dock/undock it between work and home. Obviously those are two different wireless networks. Well, I was unable to find a dhcp renewal command that would work until today (look above).

This command releases and renews your DHCP IP Address.

I’m very happy about this.

dhclient man page

When run by itself, your instance will seek out a new ip lease.

Jason Meridth


My name is Jason Meridth. I am a continuously learning senior software developer/devops/team lead/development manager trying to not let best be the enemy of better. I reserve the right to change my mind upon obtaining more information. I am also the owner and principal software consultant at Meridth, LLC. If you have any software, hardward, networking, process, etc needs please don't hesitate to reach out to me.

Raspberry Pi Kubernetes Cluster - Part 2

Howdy again.Alright, my 8 port switch showed up so I was able to connect my raspberry 3B+ boards to my home network. I plugged it in wit...… Continue reading

Raspberry Pi Kubernetes Cluster - Part 1

Published on April 07, 2018

SSH - Too Many Authentication Failures

Published on March 28, 2018