Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Want to replace bash w zsh as system shell on Ubuntu

On Tue, 2 Feb 2010, rj wrote:

Though just now I saw this:

"To start a root shell, but keep the current shell's environment, use:
sudo -s  (similar to sudo su)"

(where "sudo i" give you root's environment configuration.)

But "sudo -s", for me, returns "sudo: shell: command not found"

As others have pointed out already, this is because you have not set your
$SHELL environment variable to a valid path. In your init script settings the
$SHELL variable to /path/to/zsh should fix the broken "sudo -s" command. So,
put this somewhere in one of your init scripts (I don't use Ubuntu, but I
assume something like /etc/rc.local, or even your plain old ~/.zshrc should

    export SHELL=/path/to/zsh

You might want to check all of your environment variables by doing:


You could double-check that your new SHELL variable is set properly by calling
env after re-logging into your system with your modified init script.


Messages sorted by: Reverse Date, Date, Thread, Author