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

Want to replace bash w zsh as system shell on Ubuntu

In the couple of months I've been using Ubuntu at home, I've discovered
I need to use the "sudo" command almost daily for administrative changes
and systemwide, non-user-specific tasks and so on.

I've already set up zsh as my user shell, but the system default shell is
bash, and whenever I do a "sudo" I'm wrenched out of my familiar customized
zsh environment into a raw, minimally-config'd bash.

Accordingly, I'd like to make zsh the system shell as well as having it be
my user shell.  (I'm the only user on the system.)

I already have, in /etc/zsh/, a .zprofile, .zshenv and .zshrc, copied from
my homedir.  (Obviously some necessary tweaks & changes will have to be
made in them.)

My question is, (a) should those files be: /etc/.zprofile, etc/.zshenv and
/etc/.zshrc, or is having them in an /etc/zsh/ subdir ok?

and (b) (my main question), what exactly is the instruction-command(s) I'd
use to tell the system to run zsh instead of bash as the system shell, and
where would I need to put it?

also (c), is there any reason I'd need, for this, to put any zsh config
files in the /root directory?  I had one there briefly and just noticed
that I still have a .zcompdump file there.  (Perhaps zsh configs are
necessary there to start a root shell.  I'm a bit fuzzy on this stuff --
for years I've only used zsh via ssh on other systems, and only as a user.)

I think I want zsh to be the operative shell in all situations (unless that
would for some reason be imprudent), like on the infrequent occasion when
I also do a "sudo su -" (i.e., start a root shell).

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"

Thanks for any clarity on these issues.

Attachment: pgpdYL18r_3Fx.pgp
Description: PGP signature

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