美文网首页
mac电脑.bash_profile锁定没有权限编辑

mac电脑.bash_profile锁定没有权限编辑

作者: 街角仰望 | 来源:发表于2021-09-10 17:12 被阅读0次

给自己的用户设置编辑权限,执行以下命令:

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回车

参考:https://www.jianshu.com/p/ecdb26a13d99

相关文章

网友评论

      本文标题:mac电脑.bash_profile锁定没有权限编辑

      本文链接:https://www.haomeiwen.com/subject/zzqcqltx.html