Menu

  • Home
  • Work
    • Cloud
      • Virtualization
      • IaaS
      • PaaS
    • Java
    • Go
    • C
    • C++
    • JavaScript
    • PHP
    • Python
    • Architecture
    • Others
      • Assembly
      • Ruby
      • Perl
      • Lua
      • Rust
      • XML
      • Network
      • IoT
      • GIS
      • Algorithm
      • AI
      • Math
      • RE
      • Graphic
    • OS
      • Linux
      • Windows
      • Mac OS X
    • BigData
    • Database
      • MySQL
      • Oracle
    • Mobile
      • Android
      • IOS
    • Web
      • HTML
      • CSS
  • Life
    • Cooking
    • Travel
    • Gardening
  • Gallery
  • Video
  • Music
  • Essay
  • Home
  • Work
    • Cloud
      • Virtualization
      • IaaS
      • PaaS
    • Java
    • Go
    • C
    • C++
    • JavaScript
    • PHP
    • Python
    • Architecture
    • Others
      • Assembly
      • Ruby
      • Perl
      • Lua
      • Rust
      • XML
      • Network
      • IoT
      • GIS
      • Algorithm
      • AI
      • Math
      • RE
      • Graphic
    • OS
      • Linux
      • Windows
      • Mac OS X
    • BigData
    • Database
      • MySQL
      • Oracle
    • Mobile
      • Android
      • IOS
    • Web
      • HTML
      • CSS
  • Life
    • Cooking
    • Travel
    • Gardening
  • Gallery
  • Video
  • Music
  • Essay

Mac OS X知识集锦

21
Jun
2015

Mac OS X知识集锦

By Alex
/ in Mac OS X
0 Comments
快捷键
系统快捷键
快捷键 说明
Cmd + Shift + . 隐藏或者显示UNIX隐藏文件
Cmd + Tab 在所有窗口之间切换
Cmd + ~ 在应用程序的不同窗口之间切换
Cmd + Backspace 删除文件
Cmd + Shift + Backspace 清空回收站
Cmd + Q 退出应用程序
Cmd + W 关闭窗口
Cmd + H 隐藏窗口
Cmd + Shift + H 隐藏/显示所有窗口
Cmd + Cmd + D 显示桌面
Opt + Cmd + L 锁定计算机
Opt + Cmd + Left 向左切换工作区
Opt + Cmd + Right 向右切换工作区
Opt + Cmd + Up 任务控制
Opt + Cmd + Down 显示当前应用的窗口列表
Cmd + ESC 显示启动面板
Cmd + F1 聚焦到菜单栏
Cmd + F2 聚焦到系统托盘区域
Cmd + F3 聚焦到Docker栏
Cmd + F5 聚焦到当前窗口工具栏

Cmd + F11

隐藏/显示Docker栏
Cmd + F12 隐藏/显示通知区域
Opt + Cmd + S 对选定区域截屏并保存到剪切板
Opt + Cmd + Shift + S 对选定区域截屏并保存到文件
Cmd + Space Spotlight搜索
Ctrl + Cmd + Del 打开Activity Monitor
Cmd + Shift + Space 在Finder中搜索
F2 / Enter Finder文件重命名
Ctrl + Opt + Cmd + 9 开启/关闭有道词典取词功能
Ctrl + Opt + Cmd + 0 显示未读取的QQ消息
Ctrl + Opt + Cmd + Left 有道云音乐、iTunes,上一首
Ctrl + Opt + Cmd + Right 有道云音乐、iTunes,下一首
Ctrl + Opt + Cmd + Up 有道云音乐,喜欢
Ctrl + Opt + Cmd + Down 有道云音乐,暂停/恢复
Ctrl 有道词典取词
NIZ键盘
快捷键 说明
Fn + Pause 切换Office/Program模式,Pause下方的灯亮起则为Program模式,支持编程控制
Fn + F9 三档行程切换
Fn + Win 三秒锁住Win键
Fn + Caps 三秒 Ctrl和Caps切换
Fn + Alt 三秒 Mac/Win键位切换
Fn + Del/End/Pgdn 切换蓝牙外设
Fn + Del/End/Pgdn 三秒,启动配对
Fn + Ins 有线无线切换
Fn + G 耗电游戏模式
Fn + B 省电模式
Fn + Y 三秒,查询电量,指示灯右上角
Fn + T 待机时长切换
Fn + Up/Down 指示灯亮度调节

ESC + 左Ctrl + F2 + 右Ctrl

五秒,恢复出厂
系统配置
Bash配置

Mac终端在登陆时会执行~/.bash_profile文件。我们可以在此文件中附加脚本。

sudo免密码

实现方式和Linux下相同,执行 sudo visudo根据你的用户名添加:

1
Alex            ALL=(ALL) NOPASSWD: ALL
彩色输出

安装软件:

Shell
1
2
3
brew install xz coreutils
# 完毕后执行:
gdircolors --print-database > ~/.dir_colors

修改.bash_profile:

Shell
1
2
3
4
5
6
7
8
9
10
11
if brew list | grep coreutils > /dev/null ; then
    PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
    eval `gdircolors -b $HOME/.dir_colors`
fi
 
alias ls='ls --color=auto'
alias ll='gls --time-style=long-iso -l --color=auto'
 
alias grep='grep --color'
alias egrep='egrep --color'
alias fgrep='fgrep --color'              
设置主机名
Shell
1
2
3
4
5
6
# 用于识别机器的用户友好的名称
scutil --set ComputerName "Zircon"
# 在本地网络中显示的名称
scutil --set LocalHostName "Zircon"
# 通过SSH连接时显示的名称
scutil --set HostName "Zircon"
设置环境变量

Mac OS X默认使用Bash,可以修改文件 ~/.bash_profile 来设置环境变量,如果没有该文件可以创建,此文件是一个Shell脚本。

Finder配置
显示因此文件
Shell
1
2
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
显示目录路径

显示Path Bar,View ⇨ Show Path Bar

在标题栏显示文件路径:

Shell
1
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder
Howtos
安装和配置Homebrew
Shell
1
2
3
4
# 输入下面的命令,根据提示完成安装
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# 使用brew安装软件
brew install wget
制作安装U盘
  1. 下载镜像文件.dmg
  2. 打开dmg,把其中的Install OS X Mavericks.app拖拽到桌面
  3. 插入一只8G或更大U盘,打开Disk Utility执行分区:设置为单个分区,分区表类型为GUID Partition Table,格式化为Mac OS Extended(Journaled)
  4. 执行下面的命令完成安装U盘制作
    Shell
    1
    2
    3
    4
    sudo ~/Desktop/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia
        #Label为U盘分区的名称
        --volume /Volumes/Label
        --applicationpath ~/Desktop/Applications/Install\ OS\ X\ Mavericks.app --nointeraction
程序添加命令行参数

以Chrome为例,步骤如下:

  1. 将/Application下的Google Chrome拷贝一份为Chrome
  2. 修改Google Chrome:
    Shell
    1
    2
    3
    4
    cd /Applications/Google\ Chrome.app/Contents/MacOS
    rm Google\ Chrome
    touch Google\ Chrome
    chmod +x Google\ Chrome  
  3. 编辑新文件Google Chrome的内容为:
    Shell
    1
    2
    3
    #!/bin/sh
    # 在这里调用修改前的Chrome中的程序,可以在后面添加需要的参数
    exec '/Applications/Chrome.app/Contents/MacOS/Google Chrome' --allow-outdated-plugins 
Windows下搭建OS X虚拟机
解锁Vmware的OS X支持
  1. 安装VMware Workstation Pro 12.1.0,可以到官方下载
  2. 下载Unlocker 2.0.8并解压到Vmware的安装目录下
  3. 确保Python 2.7.x已经安装,并已经加入到环境变量PATH中
  4. Unlocker解压目录下的win-install.cmd文件上点击右键 ⇨ Run as Administrator。该脚本会替换Vmware的一些文件,以解锁对Mac OS X的支持
  5. 打开VMware Workstation,新建虚拟机,如果在“Select a Guest Operating System”一步能够看到“Apple Mac OS X”,说明Unlock成功
安装Mac OS X操作系统
  1. 下载Mac OS X的懒人包,保存好备用
  2. 创建新的虚拟机,操作系统类型选择Apple Mac OS X,版本选择OS X 10.10。系统光盘镜像选择刚刚下载的懒人包。创建完毕后,不要启动虚拟机
  3. 打开刚创建的虚拟机的存放目录,打开.vmx文件,找到 smc.present = "TRUE" ,在其下一行添加 smc.version = 0 保存
  4. 启动虚拟机,Mac OS X的安装向导会提示你进行操作系统安装。点击顶部工具栏中的磁盘工具进行分区,然后执行操作系统安装
设置和优化
  1. 安装Vmware Tools,否则非常卡顿
  2. 安装BeamOff,否则UI动画帧率极低。解压后,打开Finder,直接拖拽到Applications目录中
  3. 设置BeamOff为登录后自动启动
禁止自动运行
Creative Cloud
Shell
1
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
解压JDK
Shell
1
2
pkgutil --expand  JDK\ 7\ Update\ 80.pkg JDK7
# 找到JDK7/jdk17080.pkg/Payload,重命名为gzip扩展名,解压即可得到JDK 
解决SSH乱码问题

编辑文件/etc/ssh/ssh_config,注释掉 SendEnv LANG LC_* 这一行。

连接投影仪之后启动图标模糊

开机,立刻按住Option + Command + P + R,等待黑屏后松开即可。

10.15软件已经损坏
Shell
1
sudo xattr -d com.apple.quarantine /Applications/xxxx.app

 

← 基于tc的网络QoS管理
Next Post →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Related Posts

  • 类UNIX系统下使用Dnsmasq

Recent Posts

  • Investigating and Solving the Issue of Failed Certificate Request with ZeroSSL and Cert-Manager
  • A Comprehensive Study of Kotlin for Java Developers
  • 背诵营笔记
  • 利用LangChain和语言模型交互
  • 享学营笔记
ABOUT ME

汪震 | Alex Wong

江苏淮安人,现居北京。目前供职于腾讯云,专注容器方向。

GitHub:gmemcc

Git:git.gmem.cc

Email:gmemjunk@gmem.cc@me.com

ABOUT GMEM

绿色记忆是我的个人网站,域名gmem.cc中G是Green的简写,MEM是Memory的简写,CC则是我的小天使彩彩名字的简写。

我在这里记录自己的工作与生活,同时和大家分享一些编程方面的知识。

GMEM HISTORY
v2.00:微风
v1.03:单车旅行
v1.02:夏日版
v1.01:未完成
v0.10:彩虹天堂
v0.01:阳光海岸
MIRROR INFO
Meta
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Recent Posts
  • Investigating and Solving the Issue of Failed Certificate Request with ZeroSSL and Cert-Manager
    In this blog post, I will walk ...
  • A Comprehensive Study of Kotlin for Java Developers
    Introduction Purpose of the Study Understanding the Mo ...
  • 背诵营笔记
    Day 1 Find Your Greatness 原文 Greatness. It’s just ...
  • 利用LangChain和语言模型交互
    LangChain是什么 从名字上可以看出来,LangChain可以用来构建自然语言处理能力的链条。它是一个库 ...
  • 享学营笔记
    Unit 1 At home Lesson 1 In the ...
  • K8S集群跨云迁移
    要将K8S集群从一个云服务商迁移到另外一个,需要解决以下问题: 各种K8S资源的迁移 工作负载所挂载的数 ...
  • Terraform快速参考
    简介 Terraform用于实现基础设施即代码(infrastructure as code)—— 通过代码( ...
  • 草缸2021
    经过四个多月的努力,我的小小荷兰景到达极致了状态。

  • 编写Kubernetes风格的APIServer
    背景 前段时间接到一个需求做一个工具,工具将在K8S中运行。需求很适合用控制器模式实现,很自然的就基于kube ...
  • 记录一次KeyDB缓慢的定位过程
    环境说明 运行环境 这个问题出现在一套搭建在虚拟机上的Kubernetes 1.18集群上。集群有三个节点: ...
  • eBPF学习笔记
    简介 BPF,即Berkeley Packet Filter,是一个古老的网络封包过滤机制。它允许从用户空间注 ...
  • IPVS模式下ClusterIP泄露宿主机端口的问题
    问题 在一个启用了IPVS模式kube-proxy的K8S集群中,运行着一个Docker Registry服务 ...
  • 念爷爷
      今天是爷爷的头七,十二月七日、阴历十月廿三中午,老人家与世长辞。   九月初,回家看望刚动完手术的爸爸,发

  • 6 杨梅坑

  • liuhuashan
    深圳人才公园的网红景点 —— 流花山

  • 1 2020年10月拈花湾

  • 内核缺陷触发的NodePort服务63秒延迟问题
    现象 我们有一个新创建的TKE 1.3.0集群,使用基于Galaxy + Flannel(VXLAN模式)的容 ...
  • Galaxy学习笔记
    简介 Galaxy是TKEStack的一个网络组件,支持为TKE集群提供Overlay/Underlay容器网 ...
TOPLINKS
  • Zitahli's blue 91 people like this
  • 梦中的婚礼 64 people like this
  • 汪静好 61 people like this
  • 那年我一岁 36 people like this
  • 为了爱 28 people like this
  • 小绿彩 26 people like this
  • 彩虹姐姐的笑脸 24 people like this
  • 杨梅坑 6 people like this
  • 亚龙湾之旅 1 people like this
  • 汪昌博 people like this
  • 2013年11月香山 10 people like this
  • 2013年7月秦皇岛 6 people like this
  • 2013年6月蓟县盘山 5 people like this
  • 2013年2月梅花山 2 people like this
  • 2013年淮阴自贡迎春灯会 3 people like this
  • 2012年镇江金山游 1 people like this
  • 2012年徽杭古道 9 people like this
  • 2011年清明节后扬州行 1 people like this
  • 2008年十一云龙公园 5 people like this
  • 2008年之秋忆 7 people like this
  • 老照片 13 people like this
  • 火一样的六月 16 people like this
  • 发黄的相片 3 people like this
  • Cesium学习笔记 90 people like this
  • IntelliJ IDEA知识集锦 59 people like this
  • 基于Kurento搭建WebRTC服务器 38 people like this
  • Bazel学习笔记 37 people like this
  • PhoneGap学习笔记 32 people like this
  • NaCl学习笔记 32 people like this
  • 使用Oracle Java Mission Control监控JVM运行状态 29 people like this
  • Ceph学习笔记 27 people like this
  • 基于Calico的CNI 27 people like this
Tag Cloud
ActiveMQ AspectJ CDT Ceph Chrome CNI Command Cordova Coroutine CXF Cygwin DNS Docker eBPF Eclipse ExtJS F7 FAQ Groovy Hibernate HTTP IntelliJ IO编程 IPVS JacksonJSON JMS JSON JVM K8S kernel LB libvirt Linux知识 Linux编程 LOG Maven MinGW Mock Monitoring Multimedia MVC MySQL netfs Netty Nginx NIO Node.js NoSQL Oracle PDT PHP Redis RPC Scheduler ServiceMesh SNMP Spring SSL svn Tomcat TSDB Ubuntu WebGL WebRTC WebService WebSocket wxWidgets XDebug XML XPath XRM ZooKeeper 亚龙湾 单元测试 学习笔记 实时处理 并发编程 彩姐 性能剖析 性能调优 文本处理 新特性 架构模式 系统编程 网络编程 视频监控 设计模式 远程调试 配置文件 齐塔莉
Recent Comments
  • qg on Istio中的透明代理问题
  • heao on 基于本地gRPC的Go插件系统
  • 黄豆豆 on Ginkgo学习笔记
  • cloud on OpenStack学习笔记
  • 5dragoncon on Cilium学习笔记
  • Archeb on 重温iptables
  • C/C++编程:WebSocketpp(Linux + Clion + boostAsio) – 源码巴士 on 基于C/C++的WebSocket库
  • jerbin on eBPF学习笔记
  • point on Istio中的透明代理问题
  • G on Istio中的透明代理问题
  • 绿色记忆:Go语言单元测试和仿冒 on Ginkgo学习笔记
  • point on Istio中的透明代理问题
  • 【Maven】maven插件开发实战 – IT汇 on Maven插件开发
  • chenlx on eBPF学习笔记
  • Alex on eBPF学习笔记
  • CFC4N on eBPF学习笔记
  • 李运田 on 念爷爷
  • yongman on 记录一次KeyDB缓慢的定位过程
  • Alex on Istio中的透明代理问题
  • will on Istio中的透明代理问题
  • will on Istio中的透明代理问题
  • haolipeng on 基于本地gRPC的Go插件系统
  • 吴杰 on 基于C/C++的WebSocket库
©2005-2025 Gmem.cc | Powered by WordPress | 京ICP备18007345号-2