0
4

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 3 years have passed since last update.

パスを通すとは

Posted at

##前提
macのterminalでパスを通す方法.
zsh: command not found: コマンド名 というエラーが出た時の対処法です.

##デフォルトのシェルを確認
macのシェルにはbashとzshがあります.

$ echo $SHELL

##パスを通すとは
コマンドが格納されているディレクトリを登録しておくこと.

##手順
###1. 通っているパスを確認

$ echo $PATH

###2. パスの追加

#bashの場合
$ open ~/.bash_profile
#zshの場合
$ open ~/.zshrc
$ export PATH=/xxxx/bin:$PATH
#bashの場合
$ source ~/.bash_profile
#zshの場合
$ source ~/.zshrc

###3. パスの確認

$ コマンド --version
0
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?