avatar
how to change login shell?# Unix - 噫吁兮,危乎高哉
b*l
1
I installed a new bash in my home dir and I want to invoke this bash instead
of /bin/bash which is an old version. How to make that happen? both bash will
invoke .bashrc file and it causes recursive problem.
3x
avatar
X*r
2
first, .bashrc will not cause recursive probelm.
to change shell, use `chsh', however, only shells listed in /etc/shells
are allowed.

【在 b***l 的大作中提到】
: I installed a new bash in my home dir and I want to invoke this bash instead
: of /bin/bash which is an old version. How to make that happen? both bash will
: invoke .bashrc file and it causes recursive problem.
: 3x

avatar
b*l
3
But his one can not solve my problem. The new bash was install in my home dir.
I do not have root permission to change /etc/shells.
If I want to change csh to bash, I can use the following line in the .cshrc
file:
if ( $?prompt ) exec /bin/bash
Then bash will excute forever without problem. But my problem here is to
invoke another version of bash, which invoke .bashrc again. So this one does
not solve my problem either.
Anybody know another solvotion?

instead
will

【在 X****r 的大作中提到】
: first, .bashrc will not cause recursive probelm.
: to change shell, use `chsh', however, only shells listed in /etc/shells
: are allowed.

avatar
A*o
4

????

【在 b***l 的大作中提到】
: But his one can not solve my problem. The new bash was install in my home dir.
: I do not have root permission to change /etc/shells.
: If I want to change csh to bash, I can use the following line in the .cshrc
: file:
: if ( $?prompt ) exec /bin/bash
: Then bash will excute forever without problem. But my problem here is to
: invoke another version of bash, which invoke .bashrc again. So this one does
: not solve my problem either.
: Anybody know another solvotion?
:

avatar
p*f
5

I bet bash can be started without invoking .bashrc, and it can be made
to run your other rc files, as long as you pass to it correct parameters.

【在 b***l 的大作中提到】
: But his one can not solve my problem. The new bash was install in my home dir.
: I do not have root permission to change /etc/shells.
: If I want to change csh to bash, I can use the following line in the .cshrc
: file:
: if ( $?prompt ) exec /bin/bash
: Then bash will excute forever without problem. But my problem here is to
: invoke another version of bash, which invoke .bashrc again. So this one does
: not solve my problem either.
: Anybody know another solvotion?
:

avatar
b*l
6
Yes, that woked. -norc will not allow it to invoke any rc file and such
prevents the recursive invocation of bash.
thanks, man

dir.
.cshrc
does

【在 A*****o 的大作中提到】
:
: ????

avatar
b*l
7
Yes, you are right. With -norc option, it works great.
3x

dir.
.cshrc
does

【在 p******f 的大作中提到】
:
: I bet bash can be started without invoking .bashrc, and it can be made
: to run your other rc files, as long as you pass to it correct parameters.

avatar
c*t
8
Just to mention another solution, you can set an environmental variable
that is exported. Then in the other shells, check if the variable
is set or not. If not set, set/export it and exec the new shell.

【在 b***l 的大作中提到】
: Yes, you are right. With -norc option, it works great.
: 3x
:
: dir.
: .cshrc
: does

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。