Cheatsheet: Difference between revisions

Content added Content deleted
Line 1,097: Line 1,097:
=== IP DNS Info ===
=== IP DNS Info ===


; IP
==== IP ====
ip addr show (ip a)
ip addr show (ip a)
ifconfig
ifconfig
Line 1,104: Line 1,104:
ip route get 8.8.8.8 | head -1 | cut -d' ' -f7
ip route get 8.8.8.8 | head -1 | cut -d' ' -f7


==== DNS Config Info ====
; DNS

cat /etc/resolv.conf
cat /etc/resolv.conf
nmcli dev show | grep DNS
nmcli dev show | grep DNS
Line 1,110: Line 1,111:
resolvectl status | grep -1 'DNS Server'
resolvectl status | grep -1 'DNS Server'


; DNS of Domains
==== DNS of Domains ====

===== Host Command =====


Host Command:
host google.com
host google.com
host -t a google.com
host -t a google.com
Line 1,122: Line 1,124:
host -t any google.com
host -t any google.com


DIG Command:
===== DIG Command =====

dig google.com a
dig google.com a
dig google.com mx
dig google.com mx
Line 1,134: Line 1,137:
dig +noall +answer google.com any ==> Just answers for all records
dig +noall +answer google.com any ==> Just answers for all records


NSLOOKUP
===== NSLOOKUP =====

nslookup yahoo.com ==> Find A Record
nslookup yahoo.com ==> Find A Record
nslookup 209.191.122.70 ==> Reverse Domain Lookup
nslookup 209.191.122.70 ==> Reverse Domain Lookup