Mac 常用控制台命令

目录

打开『任何来源』信任

bash 复制代码
sudo spctl --master-disable

重启TouchBar

bash 复制代码
sudo pkill TouchBarServer

创建大小写敏感卷

bash 复制代码
diskutil apfs addVolume "$(diskutil apfs list | grep 'APFS Container Reference' | awk '{print $4}')" APFSX workspace -role D 

此时/Volumes/workspace 目录就是所创建的大小写敏感卷

disk工具

bash 复制代码
diskutil list
diskutil unmountDisk /dev/disk2
diskutil eraseDisk JHFS+ raspberry disk2

修改S/L/E目录

bash 复制代码
sudo mount -uw /
killall Finder

挂载EFI分区

bash 复制代码
diskutil list
mkdir /Volumes/efi
sudo mount -t msdos /dev/disk0s1 /Volumes/efi

查看DNS

bash 复制代码
cat /etc/resolv.conf

查看端口

bash 复制代码
netstat -AaLlnW

netstat -anp tcp | grep -i "listen"

lsof -i -P | grep -i "listen"

lsof -i tcp:1935

lsof -i :8080

sudo lsof -iTCP -sTCP:LISTEN

Office 365修改显示语言

bash 复制代码
defaults write com.microsoft.Outlook AppleLanguages '("zh-cn")'
defaults write com.microsoft.Excel AppleLanguages '("zh-cn")'
defaults write com.microsoft.Word AppleLanguages '("zh-cn")'
defaults write com.microsoft.Powerpoint AppleLanguages '("zh-cn")'
相关推荐
pe7er1 天前
macOS 应用无法打开(权限问题)解决方案
macos·mac
harmful_sheep4 天前
mac生效的终端查看
macos
iOS门童5 天前
macOS 应用"已损坏"无法打开?一文搞懂 Gatekeeper 与解决方案
macos
NPE~5 天前
[工具分享]Maccy —— 优雅的 macOS 剪贴板历史管理工具
macos·教程·工具·实用工具
差不多程序员5 天前
Mac安装OpenClaw-cn保姆级教程
macos
dzl843945 天前
mac 安装python
开发语言·python·macos
Bruce_Liuxiaowei5 天前
在 macOS 上通过 Docker 本地安装 OpenClaw 完整教程
macos·docker·容器·openclaw
阿捏利5 天前
详解Mach-O(十五)Mach-O __DATA_CONST
macos·ios·c/c++·mach-o
ShikiSuen5 天前
macOS 的 CpLk 中英切换卡顿的元凶在 InputMethodKit 本身
macos
xiayutian_c5 天前
如虎添翼-MacOS
macos