Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.
1. Configuration file
Two configuration files related to the domain name
linux
/etc/hosts
: IP -> domain name/etc/resolv.conf
: Sets the IP address of the DNS server/etc/host.conf
: Set the sequence of domain name resolution (local hosts files, DNS resolution)
win
C:\Windows\System32\drivers\etc\hosts
: IP -> domain name- DNS: Control Panel -> Network and Sharing Center -> Ethernet -> Properties -> ipv4 -> DNS
2. DNS query commands
Several common DNS commands, such as host, nslookup, dig
2.1 the host
host hhui.top
Copy the code
2.2 nslookup
nslookup hhui.top
# outputAuthoritative Answer: Name: Hhui.top Address: 47.98.136.120Copy the code
2.3 dig
dig hhui.top
# output; <<>> DiG 9.16.1-Ubuntu <<>> hhui.top; global options: +cmd ;; Got answer: ;; ->>HEADER<<-opcode: QUERY, status: NOERROR, id: 45125 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ; COOKIE: af1e8f58654ca181f69cb19c604f432998ce632d2be17ed5 (good) ;; QUESTION SECTION: ; hhui.top. IN A ;; ANSWER SECTION: Hhui.top. 503 IN A 47.98.136.120; Query time: 0 msec ;; SERVER: 10.224.10.8 # 53 (10.224.10.8);; WHEN: Mon Mar 15 19:21:13 CST 2021 ;; MSG SIZE rcvd: 81Copy the code
II. The other
1. A gray Blog:liuyueyi.github.io/hexblog
A gray personal blog, recording all the study and work in the blog, welcome everyone to go to stroll
2. Statement
As far as the letter is not as good, the above content is purely one’s opinion, due to the limited personal ability, it is inevitable that there are omissions and mistakes, if you find bugs or have better suggestions, welcome criticism and correction, don’t hesitate to appreciate
- Micro Blog address: Small Gray Blog
- QQ: a gray /3302797840