cambiar el shell predeterminado de zsh a bash

cambiar el shell predeterminado de zsh a bash

Estoy intentando cambiar mi shell predeterminado en RHEL5 de zsh a bash. Probé los métodos mencionados en estecabeza. Al escribir sudo /usr/bin/chsh -s /bin/bash, el sistema dice sudo: /usr/bin/chsh: command not found. Pero el /usr/bin/chsh está ahí. Otra forma que encontré es editar el archivo /etc/passwd con mi usrid, pero me prohíbe editarlo. ¿Alguna sugerencia?

Respuesta1

Asegúrese /usr/bin/chshde tener permisos de ejecución ejecutando sudo chmod a+x /usr/bin/chsh.


Deberías poder ejecutar chshusando tu propia cuenta. De lo contrario, estarías configurando rootel shell. Pruebe lo siguiente:

chsh -s $( which bash )

Respuesta2

Quizás su shell predeterminado ya sea bash.

Para conocer su shell predeterminado en Red Hat:

finger youruser

producción:

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

Si la Shellinformación no es /bin/bashasí, utilice 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 nuevamente su shell predeterminado:

finger youruser

producción:

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

Déjame saber si te parece bien... Saludos.

información relacionada