1
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?

Linuxコマンドprintenvについて

1
Last updated at Posted at 2025-12-22

概要

LinuxやMacで実行できる$ printenvコマンドについて簡単にまとめる。

内容

設定されている環境変数を確認する事ができる。

printenv

のように特にオプション、引数なしで実行すると環境変数の一覧が出力される。
また、下記のように引数でキー名を指定することで特定のキー名の値のみ閲覧する事ができる。

printenv 環境変数キー名

一覧表示から絞り込みたい場合は下記の様にgrepを併用するもの良さそう。

printenv | grep 環境変数キー名
1
0
2

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
1
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?