0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

iTerm2 のバージョンをコマンドで確認する

Last updated at Posted at 2025-11-10
% iTerm2 --version
zsh: command not found: iTerm2

% iTerm --version
zsh: command not found: iTerm

GUI(About iTerm2)でしか、バージョンが確認できせん。


node.js 前提

iterm2-version をインストール

% npm install iterm2-version

・ mjs ファイルを準備

iterm2-version.mjs
const { default: iterm2Version } = await import("iterm2-version");
console.log(`iTerm2 version: ${iterm2Version()}`);

・ node.js で実行

% node iterm2-version.mjs
iTerm2 version: 3.6.5

・ aliasしてコマンド化

.zshrc
alias iterm2-version="node /path/to/you/iterm2-version.mjs"

・ iterm2-version コマンド実行

% iterm2-version
iTerm2 version: 3.6.5




追伸

/Applications/iTerm.app/Contents/Info.plist内のCFBundleVersionを出力する方法なら、Macのどのアプリに対しても応用できますね。

% defaults read /Applications/iTerm.app/Contents/Info.plist CFBundleVersion
3.6.5




以上

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?