Digress: Recently, due to an attempt, we installed and set the highly recommended zsh to replace the default Bash. After a while, we found that there were a lot of things, but the same problem was also exposed, for example, there is a problem with executing commands in the zsh background, so I decided to change to bash. I forgot to record the previous method so as not to change it next time, you do not need to refer to others' blogs.
First, check the available shells in our system.
Androidyue @ Ubuntu :~ /Adb_grep $ CAT/etc/shells #/etc/shells: valid login shells/bin/sh/bin/dash/bin/bash/bin/rbash/usr/bin/tmux/bin/CSH/bin/tcsh/bin/zsh/usr/ bin/zsh/usr/local/bin/zsh
Then, we can also retrieve our current Shell
Androidyue @ Ubuntu :~ /Adb_grep $ echo $ shell/bin/zsh
Finally, the key to the problem is to execute CHSH (which should be change shell). This Command requires the root permission and prompts you to enter the password. Then, enter the available target shell in the input focus.
Androidyue @ Ubuntu :~ /Adb_grep $ chshpassword: Changing the login shell for androidyueenter the new value, or press enter for the defaultlogin shell [/bin/bash]:
Finally, if you want to take effect, You need to log out and log on (for example, the prompt for the first command is what login shells means, so ...)