Reputation: 1909
I've installed oh-my-zsh and have changed theme and customized it for the root user. How can I make these mods available for all users for which I will set zsh as default shell?
Upvotes: 1
Views: 9452
Reputation: 39516
oh-my-zsh is best installed per user. Users can fiddle with the source, adding custom plug-ins to their .oh-my-zsh/custom
directory for instance. The auto-update feature also wouldn't work on a system wide install.
To help them get started, you can provide new users with a recent clone of .oh-my-zsh
and a .zshrc
template. Adding these to /etc/skel
for instance.
I'd also question whether root needs oh-my-zsh or the same zsh config as a normal user. It's best to avoid spending too much time as root anyways.
If you really want to, you can symlink your own .oh-my-zsh and .zshrc to another user home directory including root's.
If you have to enforce a global config. There's a global zshrc
(either /etc/zshrc
or /etc/zsh/zshrc
depending on your system) that's loaded before the user .zshrc
. If you're impersonating all users on the system, you could always load your oh-my-zsh config from there.
Finally, you'll probably want to change the login shell of oh-my-zsh user to zsh
as well. Look into /etc/passwd
, chsh
and adduser.conf
for details.
Upvotes: 4
Reputation: 331
If that file is on all user directory then zsh should automatically catch it and use it as source. So i think you should put that file on every user directory who intent to use that file.
Upvotes: 0