Prettify Raspberry Pi Shell with Oh My Zsh
To make your terminal look pretty using the Oh My Zsh, follow the below-mentioned steps:
Step 1: Update and Upgrade the System
First, we will update the Raspberry Pi repository to check for the package updates. To update, use the below-mentioned command:
Then upgrade the packages to the latest versions using the following command:
Step 2: Installing and Switching to Z shell
Now, you have to install the Z shell using the following command, as we will use this shell to replace it with the default Raspberry Pi terminal and customize it accordingly:
Once it’s installed, immediately switch the default terminal to Z shell from the following command:
Enter the password to switch to Z shell.
Step 3: Installing Oh My Zsh
Next, you should install Oh My Zsh from the following command to prettify the terminal:
When prompted for the permission to continue press “Y” key:
A message will display on the terminal to confirm that the shell has changed and Oh My Zsh is installed:
Step 4: Installing Fonts
You should also install the fonts powerline for the themes using the below-mentioned command:
There are two themes in zsh that come preinstalled; those are robbyrussell and agnoster. If the user wants to opt for robbyrussell there is no need to perform this step.
Step 5: Setting up the Required Theme
Now finally, the theme can be set up by accessing the .zhrc file using the nano editor from the following command:
Within the file, search the keyword “ZSH_THEME” and change it to the desired theme. Here I have used the agnoster. The random variables for this theme are robbyrussell and agnoster and users can opt according to their choice.
Then press Ctrl+X, then Y to save the required theme setting, and finally press Enter to get back to the terminal.
Step 6: Reboot
Reboot the system to give it a fresh start with a new theme:
After the reboot, the terminal will look like this as shown in the below image:
And that’s all your terminal has been prettified by using Oh My Zsh.
Conclusion
To prettify the Raspberry Pi terminal with Oh My Zsh, first, you must install zsh on Raspberry Pi. Then switch to Z shell and modify the “.zsh file” to change the zsh theme to the required theme which includes the agnoster and robbyrussell. After the configuration, the device must be rebooted to apply changes to the shell theme using Oh My Zsh.