Mac命令

2017-07-09  本文已影响8人  ThaiLanKing
killall Finder
defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder AppleShowAllFiles -bool false

关闭Mac系统目录权限限制:

El Capitan now protects certain system directories in "rootless" mode (a.k.a. System Integrity Protection). If you run the command ls -lO /System/Library/LaunchDaemons you'll see that the directories and files under there are now marked as "restricted."

You can disable rootless mode like this:

1. Reboot into recovery mode (reboot and hold down Cmd-R)
2. Open a terminal
3. Use this command: `csrutil disable`
4. Reboot and run the command that worked prior to El Capitan
When you're done, it is highly recommended that you re-enable SIP by following the same steps, but using `csrutil enable` in step 3.

//root用户拷贝文件
MACMINI:~ myusername$ sudo su -
MACMINI:~ root# cp /Users/myusername/Desktop/myfile.plist /System/Library/LaunchDaemons/
上一篇 下一篇

猜你喜欢

热点阅读