国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

script_tool_for_linux.bash: Linux 環境下的 hosts 一鍵部署腳本

2019-10-26 18:48:08
字體:
來源:轉載
供稿:網友

Linux 環境下的 hosts 一鍵部署腳本,由 @lstoars 貢獻; @fluviusmagnus 提供增強版本。

官方網站:https://github.com/racaljk/hosts/tree/master/hosts_tools

#!/bin/sh## script_tool_for_linux## Use command: `sudo sh script_tool_for_linux.sh` or#    `su -c 'sh script_tool_for_linux.sh'`# to update your hosts file.## WARNING: the script CAN NOT replace others' hosts rules.#   If you have hosts rules provided by others, you may get conflict.#if [ `id -u` -eq 0 ]; then curl -fLo /tmp/fetchedhosts 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts' sed -i '/# Copyright (c) 2014/,/# Modified hosts end/d' /etc/hosts sed -i "s/localhost/`hostname`/g" /tmp/fetchedhosts cat /tmp/fetchedhosts >> /etc/hosts rm -f /tmp/fetchedhosts echo 'Success.'else echo 'Permission denied, are you root?'fi

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 河南省| 嘉定区| 成安县| 永嘉县| 新丰县| 抚宁县| 凯里市| 白朗县| 新干县| 博白县| 视频| 铁岭县| 湘潭市| 百色市| 武陟县| 监利县| 浦城县| 阿鲁科尔沁旗| 灌云县| 镇赉县| 聂拉木县| 天长市| 辉县市| 墨竹工卡县| 胶州市| 广东省| 邛崃市| 基隆市| 苏尼特右旗| 贺兰县| 来凤县| 济源市| 烟台市| 冀州市| 隆林| 平果县| 若羌县| 桂平市| 卢龙县| 富阳市| 广汉市|