You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

macOS下Azure Data Studio命令行工具缺失问题咨询

macOS下Azure Data Studio命令行工具的启用方法

Azure Data Studio在macOS上确实提供命令行工具,但默认未添加到系统路径,所以你找不到azuredatastudio命令,可通过以下两种方式解决:

方法一:通过内置命令快速配置

  • 打开Azure Data Studio,按Cmd+Shift+P唤起命令面板
  • 输入「Shell Command: Install 'azuredatastudio' command in PATH」并执行该命令
  • 重启终端后,即可直接使用azuredatastudio命令

方法二:手动添加路径到环境变量

Azure Data Studio的可执行文件默认路径为/Applications/Azure Data Studio.app/Contents/MacOS/azuredatastudio,手动配置步骤:

  1. 打开终端,编辑你的Shell配置文件(如~/.zshrc或~/.bash_profile,取决于当前使用的Shell)
  2. 添加一行配置:export PATH="/Applications/Azure Data Studio.app/Contents/MacOS:$PATH"
  3. 执行source ~/.zshrc(对应你的配置文件名)使更改立即生效

配置完成后,除了直接启动工具,还能通过命令打开指定文件,例如:azuredatastudio ./your-sql-file.sql

内容的提问来源于stack exchange,提问作者WestCoastProjects

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.27 08:32:35