altere o shell padrão de zsh para bash

altere o shell padrão de zsh para bash

Estou tentando alterar meu shell padrão no RHEL5 de zsh para bash. Eu tentei os métodos mencionados nestecabeça. Ao digitar sudo /usr/bin/chsh -s /bin/bash, o sistema diz sudo: /usr/bin/chsh: command not found. Mas o /usr/bin/chsh está lá. Outra maneira que encontrei foi editar o arquivo /etc/passwd com meu usrid, mas isso me proíbe de editá-lo. Alguma sugestão?

Responder1

Certifique-se /usr/bin/chshde ter permissões de execução executando sudo chmod a+x /usr/bin/chsh.


Você deve poder executar chshusando sua própria conta. Caso contrário, você estaria configurando rooto shell do. Experimente o seguinte:

chsh -s $( which bash )

Responder2

Talvez seu shell padrão já seja bash.

Para saber seu shell padrão no Red Hat:

finger youruser

saída:

Login: XXXXXXXX                         Name: XXXXXX XXXXXX
Directory: /Home/XXXXXX                 Shell: /bin/zsh
Office: XXXXXX
Office Phone: XXXXXXXXXX                Home Phone: XXXXXXXXXX
...

Se a Shellinformação não for /bin/bash, use ypchfn:

$ ypchsh
Changing NIS account information for XXXX on XXXXXXXXX.
Please enter password:

Changing login shell for XXXX on XXXXXXXXX.
To accept the default, simply press return. To use the
system's default shell, type the word "none".
Login shell [/bin/zsh]: /bin/bash

The login shell has been changed on XXXXXXXXX.

Verifique novamente seu shell padrão:

finger youruser

saída:

Login: XXXXXXXX                         Name: XXXXXX XXXXXX
Directory: /Home/XXXXXX                 Shell: /bin/bash
Office: XXXXXX
Office Phone: XXXXXXXXXX                Home Phone: XXXXXXXXXX
...

Deixe-me saber se está tudo bem para você... Felicidades

informação relacionada