Skip to content

Instantly share code, notes, and snippets.

@vicente-gonzalez-ruiz
Last active May 16, 2020 16:57
Show Gist options
  • Save vicente-gonzalez-ruiz/bb9eadd24caccf1bee90ec4b13a7facb to your computer and use it in GitHub Desktop.
Save vicente-gonzalez-ruiz/bb9eadd24caccf1bee90ec4b13a7facb to your computer and use it in GitHub Desktop.
# Check if dhcpcd is running:
sudo service dhcpcd status
# If not:
#sudo service dhcpcd start
sudo systemctl enable dhcpcd.service
sudo systemctl start dhcpcd.service
sudo nano /etc/dhcpcd.conf
interface <interface_to_configure>
static ip_address=192.168.1.4/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
# You can force to re-negotiate it by running:
sudo dhclient -v -r <interface_to_configure>
sudo dhclient -v <interface_to_configure>
# To know the configured IP:
ping <hostname>.local
ifconfig
ip addw show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment