系统快捷键
ctrl + up arrow
等同三或四指上推,打开任务桌面ctrl + left / right arrow
切换桌面command + h
: hide window +command + table
: switch windowcommand + m
: minimal windowctrl + F5
在打开的窗口之间切换,一般手不够长按不到。
BREW
brew
使用 cask
参数安装图形界面应用:
brew cask install mpv
brew cask install osxfuse
# brew install sshfs
SSHFS
brew cask install osxfuse
brew install sshfs
sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 ws:/home/plus ~/wsfs
禁止生成 DS_Store 文件
禁止.DS_store生成:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
恢复.DS_store生成:
defaults write com.apple.desktopservices DSDontWriteNetworkStores false
删除所有 .DS_store 文件
sudo find / -name ".DS_Store" -depth -exec rm {} \;
UNZIP 中文
brew install unar
unar filename.zip
unar -encoding GBK filename.zip
unar -encoding GB\ 18030 filename.zip
unar -encoding GB\ 2313 filename.zip
RESET 步骤
在 Macbook Pro 15 上,RESET 步骤
- Shut down
- Disconnect all external devices
- Reset the System Management Controller (SMC), repeat 2/3 times
- Shutdown your MacBook Air / MacBook Pro
- Connect the power adapter to the Mac
- On the MacBook / Pro’s keyboard, hold down the LEFT Shift+Control+Option keys and the Power button at the same time
- Release all keys and the power button at the same time – the little light on the MagSafe adapter may change colors briefly to indicate the SMC has reset
- Boot your Mac as usual
- Reset the nonvolatile random-access memory (NVRAM), repeat 2/3 times
- Reboot a Mac and then immediately hold down the Command+Option+P+R keys
- Then use safeboot (SHIFT at Startup)
- Then reboot normally with devices disconnected.
禁止自动休眠
禁止自动休眠可以临时解决一睡不起的问题。使用 pmset -g
检查设置。注意以下两项:
# pmset -g
autopoweroff 1 # 连接电源时的自动休眠开关
standby 1 # 使用电池时的自动休眠开关
如果开关状态为 1
则自动休眠已经开启。使用以下命令关闭自动休眠:
sudo pmset -a autopoweroff 0
sudo pmset -a standby 0
关闭自动休眠之后,Macbook 可能会在睡眠时电池耗尽,因此注意要长期不用 Macbook 时将其关机或连接电源。
Reset App Store
解决一些更新问题、下载问题等。这些方案来自不同的位置,不知道哪一条命令奏效了。
rm -rf $TMPDIR/com.apple.appstore
rm -rf ~/Library/Caches/com.apple.appstore
rm -rf ~/Library/Caches/storeaccount
rm -rf ~/Library/Caches/storeassets
rm -rf ~/Library/Caches/storedownload
rm -rf ~/Library/Caches/storeinappd
sudo softwareupdate --clear-catalog