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$
网友评论