Skip to content

Instantly share code, notes, and snippets.

@vancanhuit
Last active January 17, 2021 08:03
Show Gist options
  • Save vancanhuit/4449ac211c3b7cf17720471cda1b4a8e to your computer and use it in GitHub Desktop.
Save vancanhuit/4449ac211c3b7cf17720471cda1b4a8e to your computer and use it in GitHub Desktop.
DNS in Linux

DNS

# /etc/hosts
# /etc/resolv.conf
# /etc/nsswitch.conf
$ nslookup google.com
$ dig facebook.com

Switching and Routing

$ ip link
$ ip addr 
$ ip addr add 192.168.0.1/24 dev eth0
$ ip route add 192.168.2.0/24 via 192.168.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment