使用終端ping不通 github.com

1.vi /etc/hosts后加 192.30.253.113 github.com

2.問題解決


注意:

一、首先未開放root之前,hosts文件是只讀且無法修改的。

$ vi /etc/hosts

"/etc/hosts" [readonly] 28L, 759C

E45: 'readonly' option is set (add ! to override)

二、開始通過sudo開啟root權限


prudentwoo:~?prudentwoo$?su?-?root

Password:

su:?Sorry

prudentwoo:~?prudentwoo$?su?-?root

Password:

su:?Sorry

prudentwoo:~?prudentwoo$?sudo?passwd?root

Changing?passwordforroot.

New?password:

Retype?new?password:

prudentwoo:~?prudentwoo$?su?-?root

Password:

prudentwoo:~?root#?exit

logout

prudentwoo:~?prudentwoo$

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容