1、Download the hosts file fromhttps://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 usehttps://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

最新文章

  1. Ubuntu14.04_64位使用过程
  2. C#中的using关键字用法总结
  3. [ACM_动态规划] 嵌套矩形
  4. Record is locked by another user --Oracle行锁解锁
  5. Ubuntu系统的修改Hosts
  6. 理解Java ClassLoader机制
  7. 剖析ECMALL的登录机制
  8. UVA 11111-Generalized Matrioshkas(栈)
  9. ajax重复提交到相同url时出现的问题
  10. Servlet起步
  11. 计蒜客模拟赛D1T3 蒜头君的坐骑:用dfs转移dp
  12. QThreadPool&QRunnable&类函数的使用
  13. sublime text3配置及相关小技巧
  14. JaveWeb 公司项目(5)----- Java获取当前时间的年月日以及同Thrift格式的转化
  15. linux配置hadoop集群
  16. Python基础3 函数、递归、内置函数
  17. IDEA Spring-boot-devTools 无效解决办法二
  18. hive 使用笔记(partition; HDFS乱码;日期函数)
  19. CentOS7安装minio
  20. SpringMVC札集(07)——JSON数据

热门文章

  1. H5实现摇一摇技术总结
  2. ABP文档 - Javascript Api
  3. 设计模式之创建类模式大PK
  4. 编写自己的PHP MVC框架笔记
  5. C#通过NPOI操作Excel
  6. .NET同步与异步之相关背景知识(六)
  7. Maven 代理设置
  8. 多本地代码工作点更新到2个远端GIT仓库
  9. 在Linux配置Nginx web服务器步骤
  10. Apache2.4:AH01630 client denied by server configuration