Last update at :2024-02-07,Edit by888u
While we are learning some website building knowledge, we often download some programs or scripts online from some code repositories such as github, but sometimes you will find that some VPS cannot be downloaded from github, etc., and it shows that it cannot connect to the server. This The problem is the DNS server of the merchant's VPS. We only need to change the DNS. Changing the DNS is also troublesome for novice users, so today we provide a few lines of code. After execution, the DNS will be changed.
cat >> /etc/resolv.conf << EOF nameserver 8.8.8.8 nameserver 8.8.4.4 EOFThe above is the command to change the DNS. Just copy and paste it into Xshell or putty and press Enter. The above uses Google’s DNS because this is a foreign VPS. It is correct to use Google, but your If it is a VPS in mainland China, you can change the above to Alibaba Cloud or Baidu's DNS, and just change the data directly.
Recommended site searches: domain name registration information query, free personal cloud servers outside mainland China, free foreign all-purpose space, free domain names, domain name query network, mainland China station group servers, foreign space rental, IP anti-check high defense US servers, Telecom server rental,
发表评论