выполнение .bash_profile искажает через SSH

Хорошо, перезапуская ПК URL переписывает модуль, появляется.

2
задан 18 November 2013 в 17:32
2 ответа

I think you should try putting the alias command in .bashrc instead of .bash_profile.

I tried this on one of my servers and the alias was recognized.

I believe that it is because ssh user@host is a non-login shell. Usually .bash_profile is skipped for non-login shells.

0
ответ дан 3 December 2019 в 10:48

Вы можете поместить псевдоним в отдельный файл. Затем вы можете получить его из своего .bash_profile, и команда ssh будет выглядеть так:

ssh user@host bash -c '. .bash_aliases; shopt -s expand_aliases; myalias'
3
ответ дан 3 December 2019 в 10:48

Теги

Похожие вопросы