zjutlitao

 

1、Download the hosts file from https://laod.cn/hosts/2016-google-hosts.html [1]

2、Write a bash shell as below:

#!/bin/bash
DIR_PATH="hosts"
HOSTNAME=$(hostname)

sed -i \'/^127.0.0.1/a 127.0.1.1  \'$HOSTNAME\'\' ${DIR_PATH}
sudo cp ${DIR_PATH} /etc/hosts
#sudo apt-get install nscd      #安装name service cache daemon
sudo /etc/init.d/nscd restart
echo -e "\ncomplete!"
echo -e "\nhttps://www.google.com/ncr 方式访问GOOGLE"

download it: http://odff1d90v.bkt.clouddn.com/host.sh

3、In the terminal type:

beautifulzzzz@lpc:~/Downloads$ sudo bash host.sh
[sudo] password for beautifulzzzz: 
[ ok ] Restarting nscd (via systemctl): nscd.service.

complete!

https://www.google.com/ncr 方式访问GOOGLE

4、In the first, you should use https://www.google.com/ncr to visit the Google homepage.

 

node:

[1] The host is searched by LAOD , witch will be updated regularly.

 


@beautifulzzzz
智能硬件、物联网,热爱技术,关注产品
博客:http://blog.beautifulzzzz.com
sina:http://weibo.com/beautifulzzzz?is_all=1

 

分类:

技术点:

相关文章:

  • 2018-09-06
  • 2021-12-20
  • 2021-09-30
  • 2021-10-20
  • 2021-06-20
  • 2021-08-27
  • 2021-07-30
  • 2021-05-16
猜你喜欢
  • 2022-01-04
  • 2021-11-21
  • 2021-07-28
  • 2021-08-06
  • 2021-04-05
  • 2021-04-30
  • 2021-04-15
相关资源
相似解决方案