修改mac os的home目录
2016-03-17 11:16
405 查看
Hmmm, trying to create a directory under '/home' on a Mac?
Well, Apple doesn't want you to (with good reason, automounter owns this dir, which makes it easier to do NFS mounts and such) so you shouldn't muck with it but if you really just 'have to do it', here is how you can.
Basically:
example:
before:
after:
to have the change take effect without a reboot:
NOTE: I wouldn't do anything 'important' with this directory as it's easy to forget you altered this and an upgrade will plow over this directory, removing all data. (this dir is also not included in any Time Machine backups.
Well, Apple doesn't want you to (with good reason, automounter owns this dir, which makes it easier to do NFS mounts and such) so you shouldn't muck with it but if you really just 'have to do it', here is how you can.
Basically:
Edit /etc/auto_master and remove or comment out the line that starts with "/home".
example:
sudo vim /etc/auto_master
before:
# Automounter master map +auto_master # Use directory service /net -hosts -nobrowse,hidefromfinder,nosuid /home auto_home -nobrowse,hidefromfinder /Network/Servers -fstab /- -static
after:
# Automounter master map +auto_master # Use directory service /net -hosts -nobrowse,hidefromfinder,nosuid #/home auto_home -nobrowse,hidefromfinder /Network/Servers -fstab /- -static
to have the change take effect without a reboot:
sudo automount
mkdir /home/test
ls -l /home/ total 0 drwxr-xr-x 3 root admin 102 Aug 10 11:33 test
NOTE: I wouldn't do anything 'important' with this directory as it's easy to forget you altered this and an upgrade will plow over this directory, removing all data. (this dir is also not included in any Time Machine backups.
相关文章推荐
- xcode7.2 App Transport Security has blocked a cleartext HTTP 报错解决办法
- 【LeetCode】94. Binary Tree Inorder Traversal
- 【追求进步】重建二叉树
- 外网主机怎样将数据包发送到共用一个公网IP的局域网某特定主机上的
- socket(套接字)
- jQuery插件:简易年月日选择器
- -agentlib和-Xdebug区别
- iOS-->sqlite数据库,数据表创建,数据的增删改查
- python os模块详细介绍
- Hadoop-2.5.1集群安装配置笔记
- BZOJ3512: DZY Loves Math IV
- android开发——跨进程通讯数据传递(二)
- 吃在北京
- Bezier曲线原理—动态解释
- contains和compareDocumentPosition 方法来确定是否HTML节点间的关系
- Bootstrap 标签
- SpringMvc微信JS-API获取地理位置
- EditText边框隐藏
- Linux的Signal及Singal处理(SIGQUIT SIGKILL SIGBUS等)
- 友盟集成微信分享,显示您的设备没有安装微信问题及解决办法