12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Arch Linux と Zsh で $PATH の設定にハマることがある

Last updated at Posted at 2012-06-15

Arch Linux では /etc/profile が ~/.zshenv の後に読み込まれるうえ、中で PATH=hogehoge しているために ~/.zshenv でセットした $PATH が上書きされてしまう。

回避策は3つ:

  1. /etc/profile を書き換える
  2. .zprofile などの /etc/profile の後に読み込まれるファイルでパスを設定する
  3. .zprofile などで source ~/.zshenv する

2か3の場合、自分でパスを設定した後 typeset -U path して $PATH 内の重複する要素を消すとよい。

12
11
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
12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?