> ## Content Index
> Fetch the complete content index at: https://sgpublic.xyz/llms.txt
> Use this file to discover other available public pages before exploring further.

# mise：一个更灵活的包管理工具，附常见工具推荐
- URL: https://sgpublic.xyz/p/2026/10/6ad596dc404a0500012b805e/
- Published: 2026-10-19T05:03:15.000Z
- Updated: 2026-10-19T11:07:10.000Z
- Author: Haven Madray
- Tags: 运维, 算力平台

> 本文假定读者理解 toml 文件格式语法。

[mise](https://github.com/jdx/mise?ref=sgpublic.xyz) 是一个开源的，类似包管理器的工具，他可以从 GitHub Release 下载并安装例如 pixi、mihomo、mosdns 等应用，甚至还能管理例如 Java、GoLang、Node.js 等开发 SDK，是一款非常强大的工具，非常推荐使用。

## 安装

​使用官方脚本一键安装：

```shell
curl https://mise.run | sh
```

然后使用以下命令初始化环境：

```shell
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
```

执行完后关闭终端并重新打开，新建配置文件 `~/.config/mise/config.toml` 并填入以下内容：

```shell
[settings]
lockfile = true
lockfile_platforms = ["linux-x64"]
```

保存即完成初始化。

若想要更新 `mise`，可使用以下命令：

```shell
mise self-update
```

## 基本使用

接下来是安装工具，例如想添加 `zulu-jdk` ，版本 25，可使用以下命令：

```shell
mise config set --global tools.java zulu-25
```

也可以手动编辑配置文件 `~/.config/mise/config.toml` ，编写以下内容：

```toml
[tools]
java = "zulu-25" # 添加这一行
```

然后使用以下命令锁定具体版本，每次修改了配置文件都需要执行这个命令应用配置，重新执行这个命令可以更新工具版本：

```shell
mise lock --global
```

锁定版本后使用以下命令安装：

```shell
mise install
```

安装成功后可检查版本：

```shell
ubuntu@notebook:~$ java --version
openjdk 25.0.4.1 2026-08-18 LTS
OpenJDK Runtime Environment Zulu25.36+205-CA (build 25.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu25.36+205-CA (build 25.0.4.1+1-LTS, mixed mode, sharing)
```

## 工具推荐

以下工具均为我认为比较好用的工具，能极大提高开发和学习效率，推荐给大家。

### process-compose

[process-compose](https://github.com/F1bonacc1/process-compose?ref=sgpublic.xyz) 是一个使用风格类似 docker-compose 的进程编排工具，可以在 systemd 不可用时作为 systemd 的替代方案。

```shell
mise use -g zellij@latest
```

### zellij

[zellij](https://github.com/zellij-org/zellij?ref=sgpublic.xyz) 是一个会话保持工具，可以帮你托管需要长时间运行的脚本或程序，避免 SSH 连接断开导致这些脚本或程序停止运行。

```shell
mise use -g zellij@latest
```

### pixi

[pixi](https://github.com/prefix-dev/pixi?ref=sgpublic.xyz) 是一个跨平台的项目与包管理工具，可以一站式管理 Python、cuda-toolkit 等环境依赖和 pypi 依赖。

```shell
mise use -g pixi@latest
echo 'eval "$(pixi completion --shell bash)"' >> ~/.bashrc
```

### edit

[edit](https://github.com/microsoft/edit?ref=sgpublic.xyz) 是一个终端文本编辑器，可以使用在 Windows 上一模一样的快捷键，可鼠标操作，完全符合 Windows 用户使用习惯。

```shell
mise use -g github:microsoft/edit@latest
```

### beszel

[beszel](https://github.com/henrygd/beszel?ref=sgpublic.xyz) 是一个轻量级服务器监控工具，可监控内存占用、硬盘占用、显卡占用等信息，可提供资源不足预警。

```shell
mise tool-alias set beszel github:henrygd/beszel
mise tool-alias set beszel-agent github:henrygd/beszel

mise use -g \
  --tool-option asset_pattern=beszel_linux_amd64.tar.gz \
  beszel@latest
mise use -g \
  --tool-option asset_pattern=beszel-agent_linux_amd64.tar.gz \
  beszel-agent@latest
```