Logo

dev-resources.site

for different kinds of informations.

Enhance Your macOS Terminal with Oh My Zsh, Autosuggestions, and Powerlevel10k

Published at
1/10/2025
Categories
zsh
terminal
linux
Author
arnavsharma2711
Categories
3 categories in total
zsh
open
terminal
open
linux
open
Author
15 person written this
arnavsharma2711
open
Enhance Your macOS Terminal with Oh My Zsh, Autosuggestions, and Powerlevel10k

Introduction

As someone who spends a lot of time in the terminal, I know how powerful it can be for developers, system administrators, and tech enthusiasts like myself. The terminal provides a direct interface to the operating system, but the default experience can often feel plain and lacking in features that boost productivity and ease of use. Thankfully, I discovered tools and customizations that transformed my terminal into a visually appealing and highly functional workspace.

One of the first tools I came across was Oh My Zsh, an open-source framework that makes managing Zsh configurations incredibly easy. Zsh, or Z shell, is a powerful alternative to the default Bash shell on macOS, offering enhanced features like better tab completion, command history, and scripting capabilities. Oh My Zsh takes it a step further with a vast array of plugins and themes that have made my terminal sessions more efficient and enjoyable.

To further enhance my workflow, I added Zsh Autosuggestions. This handy tool provides intuitive command suggestions, allowing me to quickly recall and reuse commands without typing them out completely. It's been a game-changer, saving me time and reducing the repetitive strain of retyping frequent commands.

Finally, I discovered Powerlevel10k, a theme that not only makes my terminal look great but also provides a wealth of information at a glance. From showing the current git branch to displaying system load, Powerlevel10k has become an essential part of my terminal setup.

In this article, I'll walk you through how I set up Oh My Zsh on macOS, integrated Zsh Autosuggestions to improve my command-line experience, and installed Powerlevel10k to give my terminal a sleek, functional appearance. Whether you're a terminal pro or just starting out, these tools can revolutionize your command-line experience, making it more efficient, visually appealing, and tailored to your needs.


Setting Up Oh My Zsh on macOS

Step 1: Install Zsh

To get started, I first needed to ensure I had the latest version of Zsh installed. While Zsh comes pre-installed on macOS, I used Homebrew to update it to the latest version. Here's how I did it:

brew install zsh
Enter fullscreen mode Exit fullscreen mode

Step 2: Install Oh My Zsh

Next, I installed Oh My Zsh using a simple installation script. I chose to use curl, but wget works just as well:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

Step 3: Set Zsh as the Default Shell

After installing Oh My Zsh, I set Zsh as my default shell:

chsh -s $(which zsh)
Enter fullscreen mode Exit fullscreen mode

I then restarted my terminal for the changes to take effect.

Step 4: Customize Oh My Zsh

I opened my .zshrc file to customize my Zsh setup, including themes and plugins:

nano ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

I set the theme to something I liked and added a few plugins to enhance my terminal's functionality. Once done, I reloaded my configuration with:

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Enhancing Zsh with Autosuggestions

Step 1: Install zsh-autosuggestions Plugin

To add autosuggestions, I cloned the zsh-autosuggestions repository into the Oh My Zsh custom plugins directory:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode

Step 2: Enable the Plugin

I then enabled the plugin by editing my .zshrc file:

nano ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

I added zsh-autosuggestions to the list of plugins:

plugins=(git zsh-autosuggestions)
Enter fullscreen mode Exit fullscreen mode

Step 3: Apply the Changes

Finally, I reloaded my Zsh configuration to activate the plugin:

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Now, I get helpful command suggestions as I type, which has sped up my workflow significantly.


Installing and Configuring Powerlevel10k

Step 1: Install Powerlevel10k

For a visually stunning terminal, I installed Powerlevel10k by cloning its repository:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
Enter fullscreen mode Exit fullscreen mode

Step 2: Set Powerlevel10k as the Theme

I then updated my .zshrc file to set Powerlevel10k as my theme:

nano ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

I changed the theme line to:

ZSH_THEME="powerlevel10k/powerlevel10k"
Enter fullscreen mode Exit fullscreen mode

Step 3: Apply the Changes

After saving the file, I reloaded my Zsh configuration:

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Step 4: Configure Powerlevel10k

The first time I loaded the theme, Powerlevel10k launched a configuration wizard that helped me customize my prompt. If the wizard didn’t start automatically, I could trigger it manually with:

p10k configure
Enter fullscreen mode Exit fullscreen mode

This wizard allowed me to set up a prompt that displays essential information, making my terminal both beautiful and highly functional.


Conclusion

With Oh My Zsh, Zsh Autosuggestions, and Powerlevel10k, I’ve turned my macOS terminal into a powerful and aesthetically pleasing workspace. These tools have enhanced my productivity, made my workflow smoother, and added a personal touch to my terminal sessions. If you’re looking to improve your terminal experience, I highly recommend trying these tools out for yourself.

linux Article's
30 articles in total
Favicon
Easy development environments with Nix and Nix flakes!
Favicon
Setting Up a Simple Two-Node Kubernetes Cluster in No Time
Favicon
Nextcloud on Raspberry Pi - Fedora + Podman Quadlets
Favicon
NVIDIA Drivers with Secure Boot on Ubuntu
Favicon
Как создать свой VPN и получить доступ ко всему?
Favicon
How I used a named pipe to save memory and prevent crashes (in Perl)
Favicon
KDE vs GNOME vs Others: Choosing the Best Linux Desktop Environment in 2025
Favicon
The Linux Foundation Data and AI Fundamentals
Favicon
Kubernetes Security Best Practices
Favicon
A new shell for using modern alternatives to Unix commands
Favicon
Como configurar 2FA em Servidores Linux
Favicon
Configurar servidor de archivos local con Ubuntu y Samba
Favicon
Google Cloud Shell: Establishing Secure Connections via SSH
Favicon
Understanding Linux Shells: Interactive, Non-Interactive, and RC Files
Favicon
[Boost]
Favicon
I am going to learn java in next 8 weeks, please follow me for regular updates
Favicon
Configuring network access with Cisco ASA via minicom utility
Favicon
Fixing Linux Backup Sync Issues for exFAT Compatibility
Favicon
Enhance Your macOS Terminal with Oh My Zsh, Autosuggestions, and Powerlevel10k
Favicon
Turning Markdown into Learning: publishing a challenge on labs.iximiuz.com
Favicon
Fixes for a critical rsync vulnerability (CVE-2024-12084) have been released for Stable/Bookworm, Testing and Unstable....
Favicon
My Zig with Ghostty
Favicon
Understanding Node Problem Detector in Kubernetes: Beyond Default Node Conditions
Favicon
Nginx Simplified: Technical Insights with Real-World Analogies
Favicon
GNOME vs KDE Plasma: Which One Is for You?
Favicon
SSH Keys | Change the label of the public key
Favicon
Debian and KDE 6 - WSL - How to install KDE 6 via Debian - Windows 11 - X410 - Linux - 2024 https://www.youtube.com/watch?v=yrtgmwsptVc
Favicon
Linux/Unix login overview and a bit of clever tricks with "history"
Favicon
🏆 Branching to Level Up in the Cloud! ☁️
Favicon
Mastering Linux File Systems: Everything You Need to Know About Symlinks and Hard Links

Featured ones: