Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My .bash_profile is locked. How do I edit it? [closed]

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?

like image 864
PWiggin Avatar asked Apr 05 '13 01:04

PWiggin


People also ask

Where is .bash_profile located on Mac?

The . bash_profile files on Mac are located in the Finder app's home directory. It is usually invisible. You can press "Command" + "Shift" + "." together to find the hidden files on your Mac.

How do I exit bash profile?

bash_profile . This will open your profile in a simple text editor. Functions like saving changes work as they would for any normal Mac program, with the docked menu bar. So exiting the editor would just be cmd+q .


1 Answers

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
like image 107
TheEwook Avatar answered Oct 06 '22 12:10

TheEwook