[异常解决] How make ubuntu use Google Search

 

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

 

posted @ 2016-12-26 01:20  beautifulzzzz  阅读(574)  评论(2编辑  收藏  举报