Como alterar o Login Shell no Mac OS X do bash para o zsh?

82

Estou tentando alterar o shell de login do Mac OS X de bash para zsh . Eu vejo é possível no Mac OS X Leopard , mas para o OS X Lion não consigo encontrar um caminho. Eu realmente espero que seja possível mudar o shell de login do bash para outra coisa. Não sei exatamente onde procurar.

    
por Idlecool 28.11.2011 / 22:34

4 respostas

90

Você pode alterar o shell do usuário pelo seguinte comando:

chsh -s /bin/zsh

Nota: Para alterá-lo para um shell não padrão, verifique se seu caminho foi adicionado ao arquivo /etc/shells .

    
por 28.11.2011 / 22:38
48

Curiosamente, o mesmo método que você vincula em sua pergunta ainda funciona no OS X Lion através do Sierra (10.12). A única diferença: o painel de preferências é chamado Usuários & Grupos em vez de Contas .

  1. Open "System Preferences" → "Users & Groups".
  2. Unless the lock icon is already unlocked, click the lock icon and authenticate yourself.
  3. Context-click on a user in the list of user names (hold down the Control key while clicking, or right-click on a right-handed two button mouse).
  4. In context menu, choose "Advanced Options…".
  5. Choose "Login shell" in the sheet that appears.

The note at the top of the "Advanced Options" screen claims you have to restart for the change to take effect, but you really just need to log out and back in again.

    
por 01.12.2011 / 18:21
10

Ou:

sudo dscl . change /users/$USER UserShell /bin/bash $(which zsh)
    
por 25.11.2012 / 10:52
1

Se alguém se perguntando o mesmo problema acontece no macOS Sierra e o seguinte comando me permitiu alterar o shell sem problemas:

chpass -s /usr/local/bin/zsh
    
por 25.11.2016 / 08:02

Tags