How can I make zsh my default shell on Debian 12?

0
5
Asked By CuriousCat42 On

I recently installed zsh on my Debian 12 system and tried setting it as my default shell using the command `chsh -s $(which zsh)`. After logging out and back in, I checked to see if it worked by running `echo $SHELL`, but it still shows `/bin/bash`. I also looked up additional solutions online and came across a thread that suggested different methods, some of which seemed questionable. I ran `grep $USER /etc/passwd` and it returned `... /home/myusername/:/usr/bin/zsh`, and `grep zsh /etc/shells` lists both `/bin/zsh` and `/usr/bin/zsh`. Can anyone help me figure out what I'm doing wrong or how to fix this? Thanks! 🙂

1 Answer

Answered By TechyTurtle3 On

It sounds like you’re on the right track! First, try running `readlink /proc/$$/exe` to check which shell your session is currently using. If it shows `/usr/bin/bash`, it means your shell hasn’t updated yet. Ensure that zsh is properly installed and listed in `/etc/shells`. You might also want to run the command `sudo chsh -s $(which zsh) $USER` to change the shell globally for your user. After that, log out completely and log back in. Let me know if that works!

NinjaCoder99 -

I had the same issue once! It turned out I needed to fully restart my session instead of just logging out. Make sure all processes are closed before trying again.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.