Skip to content

Commit 08336b4

Browse files
Auto-update blog content
1 parent 73a1553 commit 08336b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+11693
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
layout: post
3+
title: "在Mac电脑上安装adb环境"
4+
date: 2024-09-26T10:49:56+0800
5+
description: "当你在命令行输入或,那么说明你的 Mac 上没有安装 ADB(Android Debug Bridge),或者它没有添加到你的路径中。"
6+
keywords: "mac 安装adb"
7+
categories: ['未分类']
8+
tags: ['Macos', 'Adb']
9+
artid: "142549247"
10+
arturl: "https://blog.csdn.net/Jackson_Wen/article/details/142549247"
11+
image:
12+
path: https://api.vvhan.com/api/bing?rand=sj&artid=142549247
13+
alt: "在Mac电脑上安装adb环境"
14+
render_with_liquid: false
15+
featuredImage: https://bing.ee123.net/img/rand?artid=142549247
16+
featuredImagePreview: https://bing.ee123.net/img/rand?artid=142549247
17+
cover: https://bing.ee123.net/img/rand?artid=142549247
18+
image: https://bing.ee123.net/img/rand?artid=142549247
19+
img: https://bing.ee123.net/img/rand?artid=142549247
20+
---
21+
22+
23+
24+
# 在Mac电脑上安装adb环境
25+
26+
当你在命令行输入 `adb version``adb devices`, 报错:`zsh: command not found: adb` ,那么说明你的 Mac 上没有安装 ADB(Android Debug Bridge),或者它没有添加到你的路径中。你可以按照以下步骤安装和配置 ADB:
27+
28+
#### 1. 使用 Homebrew 安装 ADB
29+
30+
如果你还没有安装 Homebrew,可以先安装:
31+
32+
```bash
33+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
34+
35+
```
36+
37+
然后在终端中运行这两个命令将 Homebrew 添加到您的 PATH 中:
38+
39+
```bash
40+
printf '%s\n' '' 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/你的用户名/.zprofile
41+
eval "$(/opt/homebrew/bin/brew shellenv)"
42+
43+
```
44+
45+
输入 `brew help` 开始启动Homebrew。
46+
47+
然后,使用 Homebrew 安装 Android 平台工具:
48+
49+
```bash
50+
brew install android-platform-tools
51+
52+
```
53+
54+
#### 2. 确保 ADB 在路径中
55+
56+
Homebrew 通常会自动将 ADB 添加到路径中。如果你仍然遇到问题,可以检查你的环境变量:
57+
58+
打开你的 shell 配置文件(比如 `~/.zprofile` ),
59+
60+
```bash
61+
open .zprofile
62+
63+
```
64+
65+
确保包含以下内容:
66+
67+
```bash
68+
eval "$(/opt/homebrew/bin/brew shellenv)"
69+
70+
```
71+
72+
重新加载配置文件(假如你有添加内容):
73+
74+
```bash
75+
source ~/.zprofile
76+
77+
```
78+
79+
#### 3. 验证安装
80+
81+
确认 ADB 已正确安装并在路径中:
82+
83+
```bash
84+
adb version
85+
86+
```
87+
88+
如果显示 ADB 的版本信息,就说明安装成功。
89+
90+
91+
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
---
2+
layout: post
3+
title: "MacOS-命令行详解使用教程"
4+
date: 2024-12-03T16:44:21+0800
5+
description: "本章讲述MacOs命令行详解的使用教程,感谢大家观看。本人博客:如烟花般绚烂却又稍纵即逝的主页MacOs命令行前言:在 macOS 上,Terminal(终端) 是一个功能强大的工具,它允许用户通过命令行直接与系统交互。本教程将详细介绍 macOS 命令行的基础与进阶操作,帮助你更高效地使用 Mac。文章目录一、什么是终端与 Shell1.1 终端介绍1.2 Shell 的作用二、终端的基本操作2.1 打开终端2.2 基本命令三、文件与目录操作3.1 查看当前目录3.2 切换目录3.3 创建"
6+
keywords: "macos terminal"
7+
categories: ['Mac']
8+
tags: ['Macos']
9+
artid: "144212264"
10+
arturl: "https://blog.csdn.net/weixin_60489641/article/details/144212264"
11+
image:
12+
path: https://api.vvhan.com/api/bing?rand=sj&artid=144212264
13+
alt: "MacOS-命令行详解使用教程"
14+
render_with_liquid: false
15+
featuredImage: https://bing.ee123.net/img/rand?artid=144212264
16+
featuredImagePreview: https://bing.ee123.net/img/rand?artid=144212264
17+
cover: https://bing.ee123.net/img/rand?artid=144212264
18+
image: https://bing.ee123.net/img/rand?artid=144212264
19+
img: https://bing.ee123.net/img/rand?artid=144212264
20+
---
21+
22+
23+
24+
# MacOS 命令行详解使用教程
25+
26+
![](https://i-operation.csdnimg.cn/images/cf31225e169b4512917b2e77694eb0a2.png)macOS 终端与 Shell 使用指南
27+
28+
29+
30+
> | |
31+
> | --- |
32+
> | 本章讲述MacOs命令行详解的使用教程,感谢大家观看。 本人博客:[如烟花般绚烂却又稍纵即逝的主页](https://blog.csdn.net/weixin_60489641?type=blog) **MacOs命令行前言**: 在 macOS 上,**Terminal(终端)** 是一个功能强大的工具,它允许用户通过命令行直接与系统交互。本教程将详细介绍 macOS 命令行的基础与进阶操作,帮助你更高效地使用 Mac。 在这里插入图片描述 |
33+
34+
## 一、什么是终端与 Shell
35+
36+
#### 1.1 终端介绍
37+
38+
> 终端是 macOS 提供的一个命令行工具,它允许用户通过文本输入与操作系统进行交互。常见的终端模拟器包括默认的 **Terminal.app** 和更现代的 **iTerm2**
39+
40+
#### 1.2 Shell 的作用
41+
42+
> Shell 是命令行的解释器,负责解析用户输入的命令并执行操作。macOS 默认使用 **zsh**(在 Catalina 版本之后),你也可以选择使用其他 Shell,如 **bash****fish**
43+
44+
---
45+
46+
## 二、终端的基本操作
47+
48+
#### 2.1 打开终端
49+
50+
> * **方法 1**:按下 `Command + Space` 打开 Spotlight,输入 “Terminal” 并回车。
51+
> * **方法 2**:从 `应用程序 > 实用工具` 中找到终端并打开。
52+
53+
#### 2.2 基本命令
54+
55+
以下是一些常用的基础命令:
56+
57+
| 命令 | 功能 | 示例 |
58+
| --- | --- | --- |
59+
| `pwd` | 显示当前工作目录 | `pwd` |
60+
| `ls` | 列出当前目录的内容 | `ls -l` |
61+
| `cd` | 切换到指定目录 | `cd ~/Desktop` |
62+
| `clear` | 清屏 | `clear` |
63+
64+
---
65+
66+
## 三、文件与目录操作
67+
68+
#### 3.1 查看当前目录
69+
70+
* 使用 `pwd` 查看当前所在目录的绝对路径。
71+
72+
---
73+
74+
#### 3.2 切换目录
75+
76+
* **切换到上一级目录**`cd ..`
77+
* **切换到根目录**`cd /`
78+
* **切换到用户目录**`cd ~`
79+
80+
---
81+
82+
#### 3.3 创建、删除和移动文件
83+
84+
* **创建文件**`touch filename`
85+
* **删除文件**`rm filename`
86+
* **移动文件**`mv source destination`
87+
* **创建目录**`mkdir dirname`
88+
* **删除目录**`rm -r dirname`
89+
90+
---
91+
92+
## 四、系统操作
93+
94+
#### 4.1 查看系统信息
95+
96+
查看 macOS 版本:
97+
98+
```bash
99+
sw_vers
100+
101+
```
102+
103+
查看硬件信息:
104+
105+
```bash
106+
system_profiler
107+
108+
```
109+
110+
---
111+
112+
#### 4.2 进程管理
113+
114+
显示运行中的所有进程:
115+
116+
```bash
117+
ps aux
118+
119+
```
120+
121+
---
122+
123+
杀死进程:
124+
125+
```bash
126+
kill -9 PID
127+
128+
```
129+
130+
---
131+
132+
## 五、网络相关操作
133+
134+
#### 5.1 测试网络连通性
135+
136+
Ping一个网站:
137+
138+
```bash
139+
ping google.com
140+
141+
```
142+
143+
---
144+
145+
查看 IP 地址:
146+
147+
```bash
148+
ifconfig
149+
150+
```
151+
152+
#### 5.2 下载文件
153+
154+
使用 curl:
155+
156+
```bash
157+
curl -O https://example.com/file.zip
158+
159+
```
160+
161+
---
162+
163+
使用 wget(需要安装):
164+
165+
> wget https://example.com/file.zip
166+
167+
## 六、高级技巧
168+
169+
#### 6.1 使用管道与重定向
170+
171+
将命令输出写入文件:
172+
173+
```bash
174+
ls > output.txt
175+
176+
```
177+
178+
过滤输出:
179+
180+
```bash
181+
ls | grep "pattern"
182+
183+
```
184+
185+
---
186+
187+
#### 6.2 编写 Shell 脚本
188+
189+
编写一个简单的脚本:
190+
191+
```bash
192+
#!/bin/bash
193+
echo "Hello, macOS Terminal!"
194+
195+
```
196+
197+
保存为 script.sh 后,赋予执行权限:
198+
199+
```bash
200+
chmod +x script.sh
201+
202+
```
203+
204+
运行脚本:
205+
206+
```bash
207+
./script.sh
208+
209+
```
210+
211+
---
212+
213+
## 七、自定义与优化
214+
215+
#### 7.1 修改终端主题
216+
217+
> 打开 Terminal > 设置 > 配置文件,选择或创建自定义主题。
218+
219+
---
220+
221+
#### 7.2 使用命令别名
222+
223+
通过 .zshrc 文件添加别名:
224+
225+
```bash
226+
alias ll='ls -lah'
227+
228+
```
229+
230+
保存后运行以下命令让别名生效:
231+
232+
```bash
233+
source ~/.zshrc
234+
235+
```
236+
237+
---
238+
239+
> 通过熟练掌握 macOS 的命令行工具,我们可以快速完成许多复杂任务,并充分发挥系统的潜力。如果你有任何问题或建议,欢迎在评论区留言,我们一起交流学习!
240+
241+
242+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
layout: post
3+
title: "Mac-卸载飞连,mac-强制卸载飞连"
4+
date: 2024-12-08T00:34:26+0800
5+
description: "mac卸载飞连"
6+
keywords: "mac卸载飞连"
7+
categories: ['未分类']
8+
tags: ['Macos']
9+
artid: "144319770"
10+
arturl: "https://blog.csdn.net/weixin_40884593/article/details/144319770"
11+
image:
12+
path: https://api.vvhan.com/api/bing?rand=sj&artid=144319770
13+
alt: "Mac-卸载飞连,mac-强制卸载飞连"
14+
render_with_liquid: false
15+
featuredImage: https://bing.ee123.net/img/rand?artid=144319770
16+
featuredImagePreview: https://bing.ee123.net/img/rand?artid=144319770
17+
cover: https://bing.ee123.net/img/rand?artid=144319770
18+
image: https://bing.ee123.net/img/rand?artid=144319770
19+
img: https://bing.ee123.net/img/rand?artid=144319770
20+
---
21+
22+
23+
24+
# Mac 卸载飞连,mac 强制卸载飞连
25+
26+
Mac 飞连 卸载失败、kill失败 处理方法
27+
28+
Mac 怎么卸载飞连?
29+
30+
### 两种方式
31+
32+
### 1. 重命名飞连二进制文件
33+
34+
```bash
35+
sudo chflags noschg /usr/local/corplink/corplink-service
36+
sudo mv /usr/local/corplink/corplink-service /usr/local/corplink/corplink-service.
37+
# 记得关闭飞连进程
38+
sudo kill {飞连 pid}
39+
40+
```
41+
42+
### 2. 卸载飞连
43+
44+
```bash
45+
# 解锁飞连
46+
sudo /usr/bin/chflags -R noschg /Applications/CorpLink.app
47+
# 再丢到废纸篓卸载
48+
49+
```
50+
51+
chflags 用法参考:<http://zhengyi.me/2016/06/02/learning-shell-chflags/>
52+
53+
54+

0 commit comments

Comments
 (0)