-1

I installed debian strech yesterday. I installed fish shell . I change the default shell to fish by the following

su chsh -s 'which fish'

Then again enter the this command

su chsh -s `which fish`

Now after I restart the PC I encountered the following error while using "su"

sathish@localhost ~> su
Password: 
Cannot execute which fish: No such file or directory
Sathish Kumar
  • 341
  • 1
  • 3
  • 8

1 Answers1

0

Did you mean to use regular single-quote chars in your first command? Doing so means your shell is now literally the string which fish rather than the path to the fish command. That explains why your second command reports that it cannot execute "which fish". Even without that mistake it is a really bad idea to change the default shell for your root account. You're just asking for trouble. And I say that as a core fish developer. Unless you are an extremely competent and confident CLI user you should not change the root shell. You can always do exec fish -l after su if you want fish as your root shell.

Kurtis Rader
  • 6,734
  • 13
  • 20