Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在mac系统下,如何在/home目录下创建修改文件? #12

Open
leoperfect opened this issue Aug 3, 2018 · 0 comments
Open

Comments

@leoperfect
Copy link
Owner

在mac系统下,如何在/home目录下创建修改文件?

macOS是基于Unix的系统,所以默认会存在/home目录,但是/home的所属用户组是wheel,root用户的默认用户组是admin,所以哪怕有root权限还是不能在/home下做一些操作。那么我们该怎么做呢?

  1. 修改/etc/auto_master文件
#
# Automounter master map
#
+auto_master            # Use directory service
/net                    -hosts          -nobrowse,hidefromfinder,nosuid
# /home                 auto_home       -nobrowse,hidefromfinder      //将该行注释掉
/Network/Servers        -fstab
/-                      -static
  1. 使修改生效
$ cd / //切换到根目录
$ sudo automount // 在根目录下执行
  1. 在/home下通过sudo进行操作
$ sudo mkdir /home/admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant