Skip to content

Instantly share code, notes, and snippets.

@anthonyray
Last active September 21, 2024 04:56
Show Gist options
  • Save anthonyray/08f805138c2b37c2554b777ea96513f2 to your computer and use it in GitHub Desktop.
Save anthonyray/08f805138c2b37c2554b777ea96513f2 to your computer and use it in GitHub Desktop.
Setting up OhMyZsh on a rapsberry Pi
  1. Connect to your raspberry Pi with SSH
  2. Install zsh : sudo apt-get update && sudo apt-get install zsh
  3. Edit your passwd configuration file to tell which shell to use for user pi : sudo vim /etc/passwd and change /bin/bash and /bin/zsh
  4. Reconnect to your raspberry, and check that zsh is the shell with echo $0.
  5. Switch to root : sudo su
  6. Install OhMyZsh : sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  7. Disconnect from your instance and reconnect it.
@tomholford
Copy link

@lamoboos223
Copy link

thank you all!

@mazbox
Copy link

mazbox commented Aug 31, 2023

I found this didn't work for the current logged in user if I switched to root, so I just ran #6 without sudo su

@InfiniteCoder01
Copy link

For some reason, I get illegal instruction

@InfiniteCoder01
Copy link

raspberrypi% sudo su
root@raspberrypi:/home/infinitecoder# sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
--2023-11-04 17:33:57--  https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18209 (18K) [text/plain]
Saving to: ‘STDOUT’

-                         100%[=====================================>]  17.78K  --.-KB/s    in 0.01s

2023-11-04 17:33:57 (1.80 MB/s) - written to stdout [18209/18209]

Cloning Oh My Zsh...
Illegal instruction
/home/infinitecoder
Error: git clone of oh-my-zsh repo failed
root@raspberrypi:/home/infinitecoder#

@joshjohanning
Copy link

@InfiniteCoder01 What version of git is it using? It looks like a git error.

Try updating it.

https://raspberrypi.stackexchange.com/questions/107533/my-apt-is-broken-illegal-instruction

@InfiniteCoder01
Copy link

I've reinstalled my system and it worked

@bencastan
Copy link

You can also do step 3 as:
#chsh -i /bin/zsh
Logout of the session and then log back in it should have changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment