跳到主要内容

Mac使用Tips

00 mac上的netstat命令使用

  1. 如果需要查询inet:netstat -anvf inet
  2. 如果需要查询TCP:netstat -anvp tcp
  3. 如果需要查询UDP:netstat -anvp udp

01 mac上测试远程端口是否通

nc -vz -w 2 ip port

-v : details

-z:仅仅扫描端口是否在监听,不发送任何数据

-w:超时时间

02 mac输入特殊符号

  1. 按⌘+⌃+Space 能快速调出 字符检视器,里边包括很多各种符号,mac的这些符号叫技术符号,默认没显示,可以在

右上角点击图标,打开如图 然后在左侧选项中选出技术符号目录就可以了。

03 mac使用快捷键

不同应用窗口切换 ⌘+tab

同一个应用的窗口间切换 ⌘+`

04 sizeUp快捷键

全屏 control + option + command + m

居中 control + option + command + c

拼接到屏幕某一侧 control + option + command + 上下左右箭头

发送到上一个/下一个显示器 control + opiton + 左右箭头

05 终端ssh的session clone

vim  ~/.ssh/config

#配置内容
host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p

第一次登录时,会在~/.ssh/下生成一个文件,第二次登录时,会复用当前的链接,不需要再输入用户名密码。