Answers:
/etc/profile
是只读的。
您可以使它可写
$ sudo chmod +w /etc/profile
或更好的是vi
,使用覆盖一个只读文件Esc-wq!
Esc-wq!
是一个很好的提示。谢谢!
运行ls -l
继续/etc/profile
显示,甚至所有者也不具有写权限:
$ ls -la /etc/profile
-r--r--r-- 1 root wheel 189 May 4 2009 /etc/profile
您可以让所有者像这样编辑它:
sudo chmod u+w /etc/profile
然后,您应该可以将其编辑为root
。
ls -l /etc/profile
发言权?-r--r--r--
?