juechafun/03-资源/操作步骤-工具技巧-Windows命令行zip.md

66 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
#领域/工具技巧 #资源/操作步骤
#复盘/5
## 一句话描述
[____Windows 安装命令行指令 zip____]
---
## 操作步骤
1. 命令行安装
```bash
winget install GnuWin32.Zip
```
2. 设置环境变量 PATH
```plaintext
C:\Program Files (x86)\GnuWin32\bin
```
3. VS Code Git Bash 兼容环境变量
```bash
export PATH="$PATH:/c/Program Files (x86)/GnuWin32/bin"
```
# -------- RAG START -------
# Windows 命令行安装 Zip 工具操作步骤
## 功能说明
通过在 Windows 系统使用 **winget** 安装 **GnuWin32.Zip**,并配置全局及 **VS Code Git Bash** 环境变量,实现原生终端与开发环境命令行中直接调用 zip 压缩解压功能。
## 前置准备
## 执行步骤
1. 打开 PowerShell 或 CMD运行以下命令完成软件包安装
```bash
winget install GnuWin32.Zip
```
2. 将实际安装路径添加至系统全局环境变量 `PATH`
```plaintext
C:\Program Files (x86)\GnuWin32\bin
```
3.**VS Code Git Bash** 终端中追加兼容路径配置:
```bash
export PATH="$PATH:/c/Program Files (x86)/GnuWin32/bin"
```
## 结果验证
重新打开系统终端或 VS Code Git Bash输入 `zip --version`。若正常返回 **GnuZip** 版本信息及帮助参数列表,即表示安装完成且环境变量已全局生效。
# -------- RAG END -------