LoginSignup
4
4

More than 5 years have passed since last update.

Ubuntuでsudoした時にPATHが引き継がれない時の対策

Posted at

"/etc/environment"に書かれてるらしい
これ毎度毎度編集するより.bash_profileにこれ書いておくのが一番楽そう
aliasだからその他のオプション効かなくなるけど多分いらないだろ
必要になったらエスケープして呼び出せばいいし利便性考えるとこれでいいかな

.bash_profile

alias sudo='sudo env PATH=$PATH'
4
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
4
4