给自己的用户设置编辑权限,执行以下命令:
1、/usr/bin/sudo /bin/chmod u+rwx /Users/username/.bash_profile
2、/usr/bin/sudo /usr/sbin/chown username /Users/username/.bash_profile
username
就是你自己的用户名
3、vim ~/.bash_profile
进行编辑
回车后显示如图,继续回车

选择e
回车后,点击i
可进行编辑,编辑完成后按esc
退出,输入:qw
回车

网友评论