Monday, May 13, 2024
510
rated 0 times [  510] [ 0]  / answers: 1 / hits: 857084  / 1 Year ago, wed, november 30, 2022, 3:11:10

I am trying to set ZSH as my default shell, however it keeps reverting back to bash.



I have tried this code:



sudo chsh -s $(which zsh)


I've also tried:



sudo chsh -s /bin/zsh 


Also tried these commands without sudo. Any ideas on what else I need to do. When running ZSH from within bash it loads up and works fine but I'd like to set it as the default shell.


More From » command-line

 Answers
0

Just using chsh:



chsh -s $(which zsh)


without sudo should work. If you use sudo it will change the shell not for your working user but for root



Finally, log out of your computer and log back in.



Troubleshooting:




[#38738] Thursday, December 1, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nerta

Total Points: 414
Total Questions: 103
Total Answers: 97

Location: England
Member since Wed, Apr 19, 2023
1 Year ago
nerta questions
Thu, May 12, 22, 16:04, 2 Years ago
Thu, Dec 2, 21, 09:19, 3 Years ago
Thu, May 27, 21, 00:41, 3 Years ago
Sun, Dec 11, 22, 08:33, 1 Year ago
;