sudo chsh -s $(which bash) $(whoami)
Rationale (especially the part how /etc/shells is not touched for sanity reasons):
https://superuser.com/a/48229
Update 2023: I guess history does repeat itself! I ran into this issue again the other day and totally had forgotten I had had this experience before and even the existence of this very blog post. I managed to figure it out from the man page though, which reads:
When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.
没有评论:
发表评论