To install chsh
run the following command in Terminal:
sudo dnf install util-linux-user
To change the default shell to the shell of your choice, without using chsh
, use
sudo lchsh -i your-user-id
The -i
option makes lchsh
interactive and it will respond with
Changing shell for ron.
New Shel[/pathto/current/shell]: /pathto/new/shell *## press enter to change shell*
Shell changed. *## Response if change is accepted*
Alternatively, you can change the default shell to the shell of your choice, without using chsh
, by using usermod
. It is not the best way, but if your chsh
or lchsh
is not installed, then:
From Terminal
sudo usermod -s yourshell yourlogin
The only other alternative is far more risky and involves editing /etc/passwd
, not recommended.
Welcome to ask.fedora. I'm not sure that you're doing anything wrong. Checking, I have zsh installed, but running
chsh -l
doesn't list it. It's possible that it can only use shells listed in/etc/shell
and that you'd have to add it to the list, but I'd be very careful about doing that and be sure to back up the original file before making any changes. It's possible that this is a bug, either with the program or with the zsh package.Thinking further, it almost looks like your shell (zsh, I presume) can't find chsh. Try using
whereis chsh
to make sure that it's installed as/usr/bin/chsh
as it should be.@sideburnschsh is indeed not installed. I have never experienced this with any Linux installation. How can I solve this? What I have done is modify Terminal preferences to run /usr/bin/zsh on start. That way I can at least use zsh.
@sideburns this is the result of
whereis zsh
and locatezsh
That's very, very odd. Checking, chsh and lchsh seem to do the same thing, but the files have different sizes and modification dates. Try using
ls -l /usr/bin/*chsh
to see if the program simply isn't executable any more. On my system, its permissions are-rws--x--x.