Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save typelogic/5e124fe2f674e50c6b5ba980ad8e5efa to your computer and use it in GitHub Desktop.
Save typelogic/5e124fe2f674e50c6b5ba980ad8e5efa to your computer and use it in GitHub Desktop.
Run dhclient on Startup in Ubuntu 18.04

dhclient is the Dynamic Host Configuration Protocol (DHCP) Client one would use to allow a client to connect to a DHCP server.

$ sudo nano /etc/rc.local

#!/bin/bash
dhclient
exit 0

$ sudo chmod 755 /etc/rc.local $ sudo systemctl enable rc-local $ sudo systemctl restart rc-local $ sudo systemctl status rc-local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment