Repository navigation
Expand file tree
/
Copy path1.macOS_quick_start.md
More file actions
158 lines (93 loc) · 3.97 KB
/
Copy path1.macOS_quick_start.md
File metadata and controls
158 lines (93 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
## macOS 入门指南
### 1 苹果官方 Mac 入门教程
[认识您的 Mac](https://support.apple.com/zh-cn/explore/new-to-mac "https://support.apple.com/zh-cn/explore/new-to-mac")
### 2 macOS 文件管理-Finder
可参考: [一篇文章带你玩转Mac Finder](https://www.jianshu.com/p/6505ead00d59 "https://www.jianshu.com/p/6505ead00d59")
### 3 macOS 快捷键
官方文档: [Mac 键盘快捷键](https://support.apple.com/zh-cn/HT201236 "https://support.apple.com/zh-cn/HT201236")
日常使用: [从 Windows 过度到 Mac 必备快捷键对照表(IntelliJ IDEA)](https://blog.csdn.net/qq_35246620/article/details/53992312 "https://blog.csdn.net/qq_35246620/article/details/53992312")
### 4 命令行包管理工具-homebrew
Homebrew 是 macOS 平台上优秀的包管理工具,类似于 Ubuntu 的 apt-get, centOS 的yum,使用方便,功能强大
homebrew 官网(包含安装教程): [https://brew.sh/](https://brew.sh/ "https://brew.sh/")
安装命令:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
使用 HomeBrew 搜索仓库软件: `brew search xxx`
HomeBrew 卡在更新界面,解决办法:
[brew update 卡住,更新 homebrew 官方源为中科大源(推荐)](https://my.oschina.net/u/4395911/blog/3305576 "https://my.oschina.net/u/4395911/blog/3305576")
```bash
// 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
// 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
// 替换homebrew-cask.git:
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
```
### 5 mac 安装第三方软件
教程:
[如何打开 macOS Sierra 允许“任何来源”选项,运行第三方应用](https://www.jianshu.com/p/d16060951236 "https://www.jianshu.com/p/d16060951236")
[安装包损坏,打不开怎么处理?打不开“XXX”,因为它来自身份不明的开发者怎么处理?](http://mac.orsoon.com/news/187368.html "http://mac.orsoon.com/news/187368.html")
执行命令: `sudo spctl --master-disable`
### 6 Mac 修改用户名
#### 6.1 添加或修改电脑用户名
此名称为电脑锁屏时显示的用户,操作的目录也为当前用户
打开「设置」-- 选择「用户与群组」-- 打开窗口左下角小锁,进行用户的新增与更新操作
#### 6.2 修改主机名
此名称为本机网络应用访问本地地址时显示的对象
查询主机名:
```bash
echo $HOSTNAME
```
修改主机名:
```bash
sudo scutil --set HostName newName
```
#### 3 修改局域网中显示的计算机名
此名称为本机在局域网中显示的用户名
打开「设置」-- 选择「共享」-- 输入新的名称
或者使用命令行进行修改:
```bash
sudo scutil --set ComputerName newName
```
### 7 macOS 原生读写 NTFS 外接硬盘
[如何让苹果电脑macOS原生支持读写多个NTFS格式硬盘](https://blog.csdn.net/Mrqiang9001/article/details/108902933 "https://blog.csdn.net/Mrqiang9001/article/details/108902933")
操作步骤:
连接硬盘,查看硬盘列表
```
diskutil list
```
修改硬盘读取方式
```
sudo vim /etc/fstab
```
赋予硬盘写入权限
```
LABEL=dirverName none ntfs rw,auto,nobrowse
```
重启,打开 **访达**,快捷键 `Command` + `Shift` + `G` ,输入 `/Volumes`
命令行打开
```
open /Volumes
```
找到对应的硬盘,打开即可
### 8 mac 外接 NTFS 硬盘文件被 macOS 占用
[项目"xxx"已被OS X使用,不能打开](https://blog.csdn.net/u013538542/article/details/79266200 "https://blog.csdn.net/u013538542/article/details/79266200")
进入到被占用文件的目录
```
cd /target/path
```
删除文件占用
```
xattr -c fileName
```
支持通配符匹配
```
xattr -c *.png
```