alias se='sudo -E '
を/etc/profile
に入れて再起動しました。次に私はse
とタイプし、端末は "コマンドが見つかりません"と言った。なぜ/ etc/profileにエイリアスがないのですか?
なぜ/ etc/profileにエイリアスがないのですか?どのようにそれを解決するには?
編集:私は試してみました
が/etc/profile
でalias se='sudo -E '
を入れ、~/.zprofile
、~/.zshrc
/etc/profile
が/etc/zprofile
を失敗したが/etc/zshenv
成功/etc/zshrc
成功を失敗した~/.zprofile
は成功~/.zshrc
を失敗した
REF:
- https://unix.stackexchange.com/questions/38175/difference-between-login-shell-and-non-login-shell
- https://en.wikipedia.org/wiki/Shell_(computing)
- https://en.wikipedia.org/wiki/X_Window_System
zshは '/ etc/profile'を読み込みます。ファイル内にある 'cat/etc/zprofile'と' 'source/etc/profile ''ができます。 –
@BigShield Thats a hack ... – heemayl
ログインシェルとインタラクティブシェルに関するあなたの親切な答えと私の無知を許してください。 –