LoginSignup
0
0

[Windows/Linux/macOS] 環境変数 PATH を改行して表示する

Last updated at Posted at 2024-01-25

ターミナルやコマンドプロンプトで環境変数 PATH を表示すると 1 行で表示されて見にくいので、各 OS 別にワンライナーで改行で分割して見やすく表示する方法です。Windows の場合は ; を、Linux/macOS の場合は : を改行に置換します。

Windows: コマンドプロンプト

echo %PATH:;=&echo.%

Windows: PowerShell

$env:PATH -split ';'

Linux, macOS: bash, zsh

echo $PATH | tr ':' '\n'
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