Add DietPi commands to zsh

I have installed zsh on my installation of DietPi. However now I cannot figure out how to add the various DietPi commands to my zsh shell. The whereis command does not give me a path to add to my PATH.

Thank you for your time and help.

DietPi scripts are located at


Thank you. That seems to work, but when I use sudo I get command not found.

probably the path to be added to root user as well?

At least on bash DietPi is loading the alias from /etc/bashrc.d/dietpi.bash

Okay. I got it. I had to modify the path in the /etc/sudoers file.

For anyone else needing this information, be sure to use sudo visudo /etc/sudoers to modify the file, you will find the default path right on the first screen.

thx for sharing

No problem. Thanks for your assistance.

I seem to have found myself a reasonable solution somewhere but cannot remember where i found it.

tested on 8.1

Place at the top of .zshrc

export PATH=/usr/bin:/boot/dietpi:/bin:/usr/sbin:/sbin:$PATH

Place at the bottom of .zshrc


Seems to have restored the majority of functionality for me, things like dietpi-launcher commands and the login motd.