You are not logged in.
I recently installed z shell and I made it my default shell by following the instructions on Arch documentation.
Now, i uninstalled the z shell making bash as my default shell. Everything works fine except "su" command. I'm only able to use sudo <command>, but su throws this error : su: failed to execute /bin/zsh: No such file or directory.
What do I do know?
Offline
Just 2 cents, try "sudo su" and/or "sudo -i" either should make your sudo user root. Then check which shell root is using. "echo $SHELL". Would reread the Zsh section in Arch wiki. Looks like it's got all the relevant config files and their locations covered etc. Also occurs to me that if you did set Zsh as default shell for root user, might want to find any relevant files left over in roots home. My understanding that uninstalling/removing a package, doesn't generally remove whatever custom config files said package/app-etc installs in home. Though don't off the top even know if any are created in the systems root users /home directory for Zsh. Only a thought.
Also all hail the wonderous Arch wiki ! See this ? Haven't spent overmuch time playing with different user/system shells. It's been on the 2do list forever. Am sure you'll get this sorted out.
Last edited by Archforum101 (2015-12-17 10:13:29)
Offline
Easy, but perhaps slightly dirty, solution may be:
sudo pacman -S zsh
su
chsh -s /bin/bash
exit
sudo pacman -Rs zsh
Offline
Also occurs to me that if you did set Zsh as default shell for root user, might want to find any relevant files left over in roots home. My understanding that uninstalling/removing a package, doesn't generally remove whatever custom config files said package/app-etc installs in home.
No package installs files to any home directory, and a user's shell is not defined in any of those files either (unless one does hair-raising things like setting `SHELL` manually or exec-ing another shell or whathever else).
As a little off-topic nit-picking, `sudo su` is pointless. You switch to root - and then you switch to root again.
Easy, but perhaps slightly dirty, solution may be:
sudo pacman -S zsh su chsh -s /bin/bash exit sudo pacman -Rs zsh
I'd rather go for a simple
sudo chsh -s /bin/bash root
But anyway, OP should first check whether the root user's shell is indeed set to /bin/zsh.
Last edited by ayekat (2015-12-17 10:19:20)
Offline
Thanks a lot everyone, I didnt realize the solution was as simple as sudo chsh -s /bin/bash root
Offline
Offline
^ Thanks for info ( was wondering about ~/user files, is good to know Arch doesn't do such w/o intervention ... and yeah point(s) taken/granted.
Think the sudo cmds to become root are still interesting and worth knowing regardless. In such event that say, "su" stops working or whatever. Not that it really matters. Glad the OP got things sorted out.
Last edited by Archforum101 (2015-12-17 10:39:04)
Offline
I'd rather go for a simple
sudo chsh -s /bin/bash root
I had no knowledge of this simplicity
Last edited by LCvanDinteren (2015-12-17 10:43:30)
Offline