I'm a bit new to this area on my Mac. I made my .bash_profile yesterday without any problems. Now when I open it, textedit says it's locked and does not let me unlock it. I tried using chmod 644 to change the permissions, but that didn't help.

What am I missing here?

有帮助吗?

解决方案

Give yourself write permissions for that file:

/usr/bin/sudo /bin/chmod u+rwx /Users/yourusername/.bash_profile
/usr/bin/sudo /usr/sbin/chown yourusername /Users/yourusername/.bash_profile

其他提示

Cypress Frankenfeld answered it in

Cannot edit bash_profile on Mac OsX [closed]

sudo chown your_user_name ~/.bash_profile

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top