Mac 技巧

收录一些在Mac和Linux下的使用技巧。

购买:2022年7月14日 从mediamarkt订购

开机启动命令

1. 编写bash脚本,并赋予执行权限, chmod 777 myscripg.sh
2. 右键文件,选择“显示简介”,将打开方式选择为终端打开 🖥 。
3. 在系统偏好设置→用户与群组→登录项的登录项中添加启动文件。

扩展屏幕

用Windows Notebook作为Mac的扩展屏,效果还是蛮好的。下载一个软件 Airplay-for-win 1)

远程访问Ubuntu服务器桌面 远程桌面

如何在旧款MacBook或iPad中开启随航功能 / free-sidecar github

Simple Server

 python3 -m http.server 9000

快捷键

程序调度

  • 访达窗口:系统偏好设置→快捷键→聚焦 ⌘ ⌥ Y (原先⌘ ⌥ space)
  • 启动台:系统偏好设置→快捷键→启动台与程序坞 ⌘ ⌥ A
  • 打开桌面:系统偏好设置→快捷键→调度中心 ⌥ + 3 (默认F11) 桌面的图标会保留
  • 显示程序坞:系统偏好设置→快捷键→启动台与程序坞 ⌘ ⌃ < (自动隐藏/常驻之间切换)
  • 显示图标:⌘ + ⌃ + space
  • 显示/隐藏文件 ⌘ + ⇧ + .
  • 上一个历史记录 ⌘ + <-

屏幕录制

  • 截屏:⌘ + ⇧ + 4 (全屏截取 ⌘ + ⇧ + 3)
  • 录制屏幕:⌘ + ⇧ + 5

连接网络磁盘

打开访达窗口,⌘ + K 调出连接窗口,输入 smb://192.168.0.157/work

输入法

  1. 删除整行:⌘ + del
  2. 删除光标后的文本:⌃ + K
  3. 删除光标前的文本:⌘ + ⌫
  4. 删除光标前的文本:Alt + ⌫
  5. 删除光标后文本:Entf / Alt + Entf

其它

拼接 MP3 (合并文件)cat doc1.mp3 doc2.mp3 doc2.mp3 > doc.mp3

MacBook M1 查询硬盘写入教程 文章2

DNS 域名服务器

cloudflare 的域名服务器地址为 1.1.1.1 和 1.0.0.1

允许任何来源 sudo spctl --master-disable

磁盘读取查询

brew install smartmontools
smartctl -a disk0

保修查询

mac

Linux 技巧

时区

当前时间: ls -l /etc/localtime
当前时区: cat /etc/timezone
时区列表: timedatectl list-timezones
设定时区: sudo timedatectl set-timezone Europe/Berlin

mac : sudo systemsetup -gettimezone

Time Zone: Europe/Berlin

VIM 编辑器

删除一行:dd (5dd 删除头5行)
删除单词:dw
移到行末:$ (0 行首)

MAIL 配置

安装 sudo apt-get install -y mailutils 以及postfix配置 2) 3)

详情参阅 MAIL文档 以及 mail 中文说明
mail user ….. <Ctrl+D> 退出 (连续两次 Ctrl+C 不保存退出)

如果出现问题,如:
send-mail: fatal: open /etc/postfix/main.cf: No such file or directory
Can't send mail: sendmail process failed with error code 75

apt-get install --reinstall postfix
dpkg-reconfigure postfix

统计Internet流量

brew install vnstat
brew services start vnstat 

运行 vnstat --help 命令查看统计数据

vnstat -d
it/skills/macskills.txt · 最后更改: 2025-06-20 10:18 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0