Cannot edit bash_profile on Mac OsX [closed]

冷暖自知 提交于 2019-12-03 05:03:35

You need to open it with sudo.

sudo vim ~/.bash_profile

The file appears greyed-out when you show hidden files because Mac OS X displays hidden files as greyed out so you can differentiate them from non-hidden files. You should still be able to edit the permissions on the file (you don't need to, though).

If you want to be able to edit without being root, you can change the owner of the file.

sudo chown your_user_name ~/.bash_profile
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!