---
title: "Mise常用命令"
slug: "mise常用命令"
canonical_url: "https://blog.youngoing.cn/posts/mise%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/"
collection: "技术"
published_at: 2026-08-29T00:00:00.000Z
updated_at: 2026-08-29T00:00:00.000Z
tags: []
author: youngo
---

## Navigation Context

- Canonical URL: https://blog.youngoing.cn/posts/mise%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/
- You are here: Home > Posts > 技术 > Mise常用命令

### Useful Next Links
- [Home](https://blog.youngoing.cn/)
- [todo](https://blog.youngoing.cn/collections/todo/)
- [技术](https://blog.youngoing.cn/collections/%E6%8A%80%E6%9C%AF/)
- [测试](https://blog.youngoing.cn/collections/%E6%B5%8B%E8%AF%95/)

## **mise 常用命令速查**

官方文档: [https://mise.jdx.dev/](https://mise.jdx.dev/)

### **版本与配置**

```
mise --version                # 查看 mise 版本
mise current <tool>           # 显示当前生效的工具版本
mise config --where <tool>    # 显示工具配置来源文件
mise doctor                   # 诊断环境问题
```

var e=\[\];function t(t){if(t.dataset.htmlFrameAuto===\`done\`)return;t.dataset.htmlFrameAuto=\`done\`;let n=t.getAttribute(\`style\`)||\`\`;if(t.classList.contains(\`code-rendered-aspect\`)||n.includes(\`--html-frame-height\`)||n.includes(\`--html-frame-aspect-ratio\`))return;let r=t.querySelector(\`iframe.code-iframe\`);if(!r)return;let i=()=>{try{let e=r.contentDocument;if(!e||!e.body)return;let n=Math.max(e.body.scrollHeight,e.body.offsetHeight);if(!n)return;let i=Math.round(window.innerHeight\*.95),a=Math.min(Math.max(n+12,96),i);t.style.setProperty(\`--html-frame-height\`,\`${a}px\`)}catch{}};e.push(i);let a=()=>{i();try{let e=r.contentDocument;e&&e.body&&\`ResizeObserver\`in window&&new ResizeObserver(()=>i()).observe(e.body)}catch{}};r.contentDocument&&r.contentDocument.readyState===\`complete\`?a():r.addEventListener(\`load\`,a)}function n(){let e=document.querySelectorAll(\`\[data-html-frame\]\`);if(!e.length)return;if(!(\`IntersectionObserver\`in window)){e.forEach(t);return}let n=new IntersectionObserver((e,n)=>{for(let r of e)r.isIntersecting&&(n.unobserve(r.target),t(r.target))},{rootMargin:\`250px 0px\`});e.forEach(e=>n.observe(e))}var r=()=>\`requestIdleCallback\`in window?window.requestIdleCallback(n,{timeout:2e3}):setTimeout(n,200);document.readyState===\`complete\`?r():window.addEventListener(\`load\`,r,{once:!0});var i=0;window.addEventListener(\`resize\`,()=>{i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>e.forEach(e=>e()))});

### **安装工具**

```
mise install rust@1.80.0      # 安装指定版本
mise install rust@latest      # 安装最新版
mise use rust@nightly         # 安装并写入当前目录配置（项目级）
mise use -g rust@stable       # 全局使用（~/.config/mise/config.toml）
```

### **查看工具**

```
mise ls                       # 列出已安装的所有工具
mise ls rust                  # 列出已安装的 rust 版本
mise ls-remote rust           # 列出可安装的远端版本
mise which rustc              # 显示实际解析的 rustc 路径
```

### **切换/移除**

```
mise uninstall rust@1.80.0    # 卸载版本
mise prune                    # 清理未使用版本
```

### **环境与执行**

```
mise exec rust@nightly -- rustc --version   # 临时用某版本执行命令
mise run <task>               # 运行配置中定义的 task
```

### **配置**

-   项目级: `mise.toml` 或 `.tool-versions`
-   全局级: `~/.config/mise/config.toml`

示例 `mise.toml`:

```
[tools]
rust = "nightly"
```