小编Bry*_*ock的帖子

为什么在我通过 launchd 添加阻止的站点后 /etc/hosts 没有阻止域?

我一直在尝试设置 Launchd 以在周一至周五上午 9 点至下午 3 点之间阻止 osX 10.12.2 上 Chrome 的多个网站

我将 launchd 设置为 cp /etc/hosts_BLOCKED_sites.txt /etc/hosts

Launchd 似乎正在正确复制文件。

$ ls -la /etc/hosts

-rw-------  1 root  wheel  619 Dec 29 09:00 /etc/hosts  
Run Code Online (Sandbox Code Playgroud)

$ sudo cat /etc/hosts

##  
# Host Database  
#  
# localhost is used to configure the loopback interface  
# when the system is booting.  Do not change this entry.  
##   
127.0.0.1   localhost   
255.255.255.255 broadcasthost  
::1             localhost   


# Blocked sites redirected to 0.0.0.0  
127.0.0.1 reddit.com  
127.0.0.1 www.reddit.com  
127.0.0.1 …
Run Code Online (Sandbox Code Playgroud)

osx chrome hosts ipv6

5
推荐指数
1
解决办法
3227
查看次数

标签 统计

chrome ×1

hosts ×1

ipv6 ×1

osx ×1