August 21, 20178 yr Hey!, So, I wanna use zsh+Oh My Zsh in the unRAID shell but I'm having some issues with the setup so that it gets re-installed on every reboot. I enabled zsh using the nerd pack plugin then I can install OMZ manually and it works perfectly but I can't figure out how to make it persist after a reboot. In summary. I enabled zsh on the nerd pack and added these lines to my go script: Quote # Install Oh My ZSH! chsh -s $(which zsh) sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" cp /boot/extra/scripts/oh-my-zsh/.zshrc /root/ The result is that I get zsh as the default shell correctly but the weird thing is that when I SSH into unRAID using PuTTy I don't have Oh My Zsh installed and yet in the command prompt in the actual server (as in, the video output from that computer) I see it installed correctly. Am I missing anything?.
December 22, 20187 yr Yes, running from the go file or from user scripts, you will have issues (just like I did). The install script uses home variables, which do not expand properly (instead of ~/ becoming /root, it becomes //). I broke down the installer script, and fixed it for unraid. Here is what I use: ZSH="/root/.oh-my-zsh" umask g-w,o-w git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH cp "$ZSH"/templates/zshrc.zsh-template /root/.zshrc sed "/^export ZSH=/ c\\ export ZSH=\"$ZSH\" " /root/.zshrc > /root/.zshrc-omztemp mv -f /root/.zshrc-omztemp /root/.zshrc chsh -s $(which zsh) env zsh -l
January 2, 20197 yr I figured out a simpler way, just define $HOME for scripts: HOME="/root" sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
February 19, 20197 yr On 1/1/2019 at 10:25 PM, d2dyno said: I figured out a simpler way, just define $HOME for scripts: HOME="/root" sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" Thought I'd just mention......zsh is in the unraid NerdPack plugin......that is probably the easiest way to install zsh and have it persist through reboots. If you haven't used NerdPack plugin, I'd suggest looking into it. Makes installing various tools and have them persist extremely easy Edit: Apologies.....you referring to Oh-My-Zsh..... Edited February 19, 20197 yr by Stupifier
February 19, 20197 yr 1 minute ago, Stupifier said: Apologies.....you referring to Oh-My-Zsh Yep, though nerdpack is what I used to install zsh, as you said 😀 then oh my zsh must be installed on top of that.
December 7, 20205 yr Late post, but hopefully one of you all might see this. I was just wondering how you're handling making your .zshrc and any plugins persistent? Thanks!
December 7, 20205 yr 7 minutes ago, xthursdayx said: Late post, but hopefully one of you all might see this. I was just wondering how you're handling making your .zshrc and any plugins persistent? Thanks! I used the User Scripts plugin to run this script on first start of array : #!/bin/bash # umask setup umask 077 # Variable Setup CONFIG=/boot/config/ssh HOME_SSH=/root/.ssh ZSH="/root/.oh-my-zsh" mkdir -p $HOME_SSH cp $CONFIG/pre-set/* $HOME_SSH chmod 700 $HOME_SSH chmod 644 $HOME_SSH/id_rsa.pub chmod 600 $HOME_SSH/id_rsa chmod 600 $HOME_SSH/authorized_keys ### Install zsh shits HOME="/root" sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" umask g-w,o-w chsh -s $(which zsh) env zsh -l newplugins="git tmux zsh-autosuggestions" sed -i "s/(git)/($newplugins)/" /root/.zshrc sed -i "s#\(ZSH_THEME *= *\).*#\1agnoster#" /root/.zshrc echo "cd /mnt/user/" >> /root/.zshrc git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH/custom/plugins/zsh-autosuggestions chmod 700 /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions ### # Copy terminal (zsh) history cp /boot/config/.zsh_history /root Combined with this array stop script to copy ZSH history and SSH keys: #!/bin/bash # Copy terminal (zsh) history touch /boot/config/.zsh_history echo "$(cat /root/.zsh_history)" >> /boot/config/.zsh_history # Variable Setup CONFIG=/boot/config/ssh HOME_SSH=/root/.ssh # Copy any new keys on exit rsync -avhW $HOME_SSH/ $CONFIG/pre-set As for .zshrc (or aliases), I use /boot/config/go to write to /etc/profile on startup (how I was taught here to do it): # Re-make aliases on boot echo " #### Aliases copied from /boot/config/go #### alias size='du -c -h -d 1 | sort -h' export TERM=xterm-color #### End Aliases ####">>/etc/profile These are just example aliases and settings, use your own (though I do love that size alias) Edited December 7, 20205 yr by d2dyno
December 7, 20205 yr Thanks @d2dyno ! Just to clarify, was there a reason you added these lines to /boot/config/go rather than your .zshrc? On 12/7/2020 at 5:23 PM, d2dyno said: # Re-make aliases on boot echo " #### Aliases copied from /boot/config/go #### alias size='du -c -h -d 1 | sort -h' export TERM=xterm-color #### End Aliases ####">>/etc/profile Edited July 19, 20214 yr by xthursdayx
June 21, 20233 yr On 12/7/2020 at 2:23 PM, d2dyno said: I used the User Scripts plugin to run this script on first start of array : Combined with this array stop script to copy ZSH history and SSH keys: As for .zshrc (or aliases), I use /boot/config/go to write to /etc/profile on startup (how I was taught here to do it): These are just example aliases and settings, use your own (though I do love that size alias) Super helpful - thank you very much - late to the game by three years - but was setting up a new box and this was helpful as i was relearning how to set things up
December 14, 20232 yr I have been using Oh My Zsh in Linux for sometime. Recently I have installed and set up unRaid on a couple servers. Unfortunately, with countless research, I have not be able to find/locate a complete walk through guide of setting up, configuring, and using Oh My Zsh in the unRaid software. I was wondering if such documentation/video exists? I have also been wanting to change or modify the command prompt gui, but have not be able to locate information towards that as well. If someone could point me into the right direction, it would be greatly appreciated.
December 22, 20232 yr On 12/14/2023 at 5:19 PM, AaronIA said: I have been using Oh My Zsh in Linux for sometime. Recently I have installed and set up unRaid on a couple servers. Unfortunately, with countless research, I have not be able to find/locate a complete walk through guide of setting up, configuring, and using Oh My Zsh in the unRaid software. I was wondering if such documentation/video exists? I have also been wanting to change or modify the command prompt gui, but have not be able to locate information towards that as well. If someone could point me into the right direction, it would be greatly appreciated. Just a few days ago I was able to get successfully set this up using this: https://gist.github.com/khongi/23103333ff0493e7cf109d6494515fba I slightly modified it to install powerlevel10k theme, a couple other oh-my-zsh plugins, and some other dotfiles.
October 22, 2025Oct 22 does this show up when for example it shows code during container updates etc? Edited October 22, 2025Oct 22 by dopeytree
May 9May 9 I'm kind of afraid to ask, but why isn't anyone else just using symlinks from the array and bypassing flash entirely? Sort of like this (after installing it with curl), set to run on array start:#!/bin/bash for TARGET in /root/.zshrc /root/.oh-my-zsh; do if [ -e "$TARGET" ] || [ -L "$TARGET" ]; then rm -rf "$TARGET" if [ $? -ne 0 ]; then logger -t zsh-setup "failed to remove $TARGET, aborting" exit 1 fi fi done ln -s /mnt/user/zshconf/.zshrc /root/.zshrc if [ $? -ne 0 ]; then logger -t zsh-setup "failed to symlink .zshrc" exit 1 fi logger -t zsh-setup "symlinked .zshrc" ln -s /mnt/user/zshconf/.oh-my-zsh /root/.oh-my-zsh if [ $? -ne 0 ]; then logger -t zsh-setup "failed to symlink .oh-my-zsh" exit 1 fi logger -t zsh-setup "symlinked .oh-my-zsh"and then when the array is stopped: #!/bin/bash for TARGET in /root/.zshrc /root/.oh-my-zsh; do if [ -e "$TARGET" ] || [ -L "$TARGET" ]; then rm -rf "$TARGET" if [ $? -ne 0 ]; then logger -t zsh-stop "failed to remove $TARGET, aborting" exit 1 fi fi done cp /mnt/user/zshconf/.zshrc /root/.zshrc if [ $? -ne 0 ]; then logger -t zsh-stop "failed to copy .zshrc" exit 1 fi logger -t zsh-stop "copied .zshrc" cp -r /mnt/user/zshconf/.oh-my-zsh /root/.oh-my-zsh if [ $? -ne 0 ]; then logger -t zsh-stop "failed to copy .oh-my-zsh" exit 1 fi logger -t zsh-stop "copied .oh-my-zsh"That way once the array is stopped after having been started, the config files persist. The only case where your config wouldn't be applied would be on first boot and in that case I wouldn't really care if I had to use zsh or bash with no config. I could be missing something and haven't fully tested this solution, but it seems a bit more clean than running the install script every boot, no?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.