Using terminal with zsh shell

Hello!

I am just a beginner in terminal usage and I tried to learn how to use it for WP theme creation. I installed zsh shell and oh-my-zsh on my terminal, but when I open website SSH my zsh theme isn’t displayed and curl or brew aren’t working though they work when I open terminal directly. Can you advice what I can do?

Thank you!

1 Like

+1 Is there a way to have an option to use zsh rather than the script that’s uses bash to launch the docker for an install?

Hi @OksanaRomaniv,

When you click on “Open Site SSH” you’re opening the site’s Docker container which is running a barebones version of Debian Linux. brew is only available for macOS.

If you’d like to use curl, you can install it using apt-get. Here’s how:

  1. First, apt-get needs updated before you can install anything. The command to run to do this is apt-get update
  2. Then, run apt-get install -y curl to install curl.

@johndcoy,

Try this:

  1. Right-click on the site and go to “Open Site SSH”
  2. Run: apt-get update
  3. Run: apt-get install -y zsh git wget
  4. Run: echo 'zsh' >> ~/.bashrc
  5. Run: sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  6. Run: echo 'alias wp="wp --allow-root"' >> ~/.zshrc
  7. Run: zsh

Or, if you’d like to run one-single command to install zsh + Oh My Zsh, try the following (it’s the commands above but concatenated and slightly modified to allow for a one-liner). Step #1 is still required.

apt-get update && apt-get install -y zsh git wget && (echo 'zsh' >> ~/.bashrc) && (wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh); (echo 'alias wp="wp --allow-root"' >> ~/.zshrc); zsh
1 Like

Thanks @clay! Worked as expected. :smiley:

1 Like