My .bash_profile is locked. How do I edit it?
13,770
Solution 1
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
Solution 2
Cypress Frankenfeld answered it in
Cannot edit bash_profile on Mac OsX [closed]
sudo chown your_user_name ~/.bash_profile
Comments
-
PWiggin almost 2 years
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?
-
Durai Amuthan.H about 9 yearsI get this error chmod: /Users/duraiamuthan/.bash_profile: No such file or directory