LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux login shell not changing for GNOME terminal in CentOS 7 (https://www.linuxquestions.org/questions/linux-newbie-8/linux-login-shell-not-changing-for-gnome-terminal-in-centos-7-a-4175578743/)

shijm 05-01-2016 06:43 AM

Linux login shell not changing for GNOME terminal in CentOS 7
 
I'm having trouble changing my login shell when I'm using GNOME terminal in CentOS 7.

I want to use fish instead of bash, and I've installed fish into my machine.

I've already added "/bin/fish" to "/etc/shells", and have also typed "chsh -s /bin/fish [my user name]" in order to change the shell permanently.

However, every time I open up a new terminal, I get bash as my login shell. What is more confusing is that when I type "echo $SHELL", it give me back "/bin/fish"!

Do I have to reboot my system to change my login shell permanently, or is this an issue? If so, does anyone have a clues to solve this problem?

Thanks in advance!

AwesomeMachine 05-02-2016 12:30 PM

I would make /bin/bash a link to /bin/fish:

$ mv /bin/bash /bin/bash.bak

@ ln -s /bin/fish /bin/bash

Bash then is fish. On many systems dash is linked to bash, rather than rewrite the shell configurations, which certain users want switched back to bash.

suicidaleggroll 05-02-2016 02:56 PM

You need to reboot for the change to take effect.

shijm 05-04-2016 06:23 PM

Hi

Thanks for answering my question!

suicidaleggroll was right, and after I rebooted my linux system, the shell changed!

jpollard 05-06-2016 07:55 AM

Quote:

Originally Posted by AwesomeMachine (Post 5539591)
I would make /bin/bash a link to /bin/fish:

$ mv /bin/bash /bin/bash.bak

@ ln -s /bin/fish /bin/bash

Bash then is fish. On many systems dash is linked to bash, rather than rewrite the shell configurations, which certain users want switched back to bash.

Umm. no.

That could/would damage every shell script that starts with "#!/bin/bash", and any scripts used during system boot (as well as every other user...). It also can get destroyed by updates to the system.

A better way is to look at the menu entry that starts gnome terminal and specify that it use fish.


All times are GMT -5. The time now is 11:23 AM.