I have moved to zsh in the course of an upgrade. However, now I'm trying to issue some systemctl commands but keep getting "command not found" errors.

My ~/.bashrc file:

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

The top of my ~/.zshrc:

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# export PATH="$PATH:$HOME/.rvm/bin"
# export PATH=$HOME/bin:/usr/local/bin:/sbin:/usr/sbin:$PATH
  export PATH="$PATH:$HOME"

# Path to your oh-my-zsh installation.
export ZSH="/Users/<username>/.oh-my-zsh"

Have been banging my head against the wall on this !! - I've tried all the paths already commented out.

  • 4
    systemctl? On macOS? – Fox Mar 11 at 18:46
  • yes ? maybe thats whats wrong? FML – Tony Mar 11 at 18:46
  • Note that ~/.bashrc is irrelevant if you're using zsh. In fact, it's not relevant on macOS in general since it starts login shells by default. – terdon Mar 11 at 19:38

Thanks to @Fox.

Had to use

sudo launchctl start|stop postfix 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.