为了方便编辑hosts,特意安装了一个hostseditor,可是还是很不方便,批量修改添加很麻烦,直到这条命令出现
doskey edithosts=subl C:\windows\system32\drivers\etc\hosts
注:需给当前用户添加hosts编辑权限
doskey edithosts=subl C:\windows\system32\drivers\etc\hosts
注:需给当前用户添加hosts编辑权限
1
vmebeh May 22, 2015 不建议修改 hosts 的写权限,改了之后普通权限运行的程序都能改 hosts,也就是桌面放个指向 notepad \windows\system32\drivers\etc\hosts 的快捷方式就能改 hosts.
Win键 -> 输入notepad -> Ctrl + Shift + Enter -> Alt + Y -> Ctrl + O -> 输入 \windows\system32\drivers\etc\hosts -> Enter 输入路径那一步可能会不快,用得不多还能忍;用得多就在文档建个 host 的硬连接 |