iTerm2: your Mac's terminal, Upgraded!
Tags: tooling, terminal, hacking
Published: 2023-09-17 07:13:30

Hey there, tech-curious realmers! Ever stopped working for a mere second, gazed at your MacBook terminal, and thought, "I'm a kickass coder/hacker; why is my terminal such a peasant?" If that's a yes, then you've landed on the blog post set to turbocharge your MacBook's cool factor by +10 at least. 🚀

This guide will not only show you how to make your terminal look cool and all, but it will also show you how to evolve its actions to a new standard. Let's crank up our new terminal guide!

![terminal hacker](https://media.tenor.com/54mjjpuowCgAAAAC/ninjala-jane.gif)


## ⼻ 1. iTerm2 installation

Introducing [**iTerm2**](https://iterm2.com/), the self-proclaimed macOS terminal replacement! With that application installed, you will literally start feeling sad when you accidentally open the traditional macOS terminal! 

![but why, meme](https://media.giphy.com/media/s239QJIh56sRW/giphy.gif)

**But why, you asked?** Here is a small list of my favorite iTerm2 features: 

* **Split Panes**: Divide a tab up (horizontally || vertically) into multiple panes, each one showing a different session. 
* **Hotkey Window**: Decide which keyboard combination you like the most to bring up a quick terminal and set it up. 
* 🔎**Search**: A robust find-on-page feature. The UI stays out of the way. All matches are immediately highlighted. Even regular expression support is offered!
* **Configurability**: A mind-boggling number of options lets you configure the terminal to suit you perfectly.

And that's just a few features that really stand out when I use iTerm on a day-to-day basis! The full feature list can be found [here](https://iterm2.com/features.html).

## ⼻ 2. Oh my Zsh! installation
Oh My Zsh' is an engaging, open-source framework steered by the community, designed for overseeing your Zsh setup. It is packed with countless beneficial functions, tools, plugins, themes, and several features that will certainly impress you... 

Let's see how to get this bad boy up and running:

Open your new iTerm2 and choose an installation method. 

**Via cUrl**
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
``` 

**Via wget**
```bash
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
```

![oh my zsh! installed](https://i.postimg.cc/Vv7Y6rdx/ohmyzshblured.jpg)

Ain't that a beauty? 

## ⼻ 3. Setup important key mappings
By now we have a newly upgraded terminal experience on our hands, but there is something very important missing. When you are a coder like me you are used to using the MacBook's keyboard mappings, my favorites are: 

- **⌘ (command)  + right/left**: go to the end or the start of a command. 
- **⌘(command)  + ⌫ (delete)**: delete entire line.
- **⌥(option)  + right/left**: navigate command per word.
- **⌥(option)  + ⌫ (delete)**: delete command per word. 

First, we need to open up our iTerm2 settings: `Profiles > Pick Profile (Default) > Edit Profiles > Keys > Key Mappings`. You should be here: 

![iTerm2 Settings for Key Mappings](https://i.postimg.cc/FR5VjPnh/Screenshot-2023-09-16-at-8-21-36-PM.png) 

To create a new **key mapping** or a preset we just have to click the (+) button next to the Presets and we get the following window pop: 

![iTerm2 Settings: new preset guide](https://i.postimg.cc/Dw4GBrG0/Screenshot-2023-09-16-at-8-28-56-PM.png)

Now all there's left to do is record our key combinations and let the terminal know what to trigger. Let's see all the aforementioned key mappings one by one. 

**Key Mapping: ⌘ + ⇨**

- Record the key mapping. 
- Click Action.
- Search: *Send Hex Code*.
- On the new input field put: *0x05*.

**Key Mapping: ⌘ + ⇦**

- Record the key mapping. 
- Click Action.
- Search: *Send Hex Code*.
- On the new input field put: *0x01*.

**Key Mapping: ⌘ + ⌫**

- Record the key mapping. 
- Click Action.
- Search: *Send Hex Code*.
- On the new input field put: *0x15*.

**Key Mapping: ⌥ + ⌫**

- Record the key mapping. 
- Click Action.
- Search: *Send Hex Code*.
- On the new input field put: *0x17*.

**Key Mapping:  ⌥ + ⇨**

- Record the key mapping. 
- Click Action.
- Search: *Send Escape Sequence*.
- On the new input field put: *f*.

**Key Mapping:  ⌥ + ⇦**

- Record the key mapping. 
- Click Action.
- Search: *Send Escape Sequence*.
- On the new input field put: *b*.

## ⼻ 4. Setup Transparency and Colors
That's a personal setting that I like, it's just a small cosmetic change that takes the iTerm2 experience to a new level for me 🧐. 

**Transparency**

Navigate to `Profiles > Pick Profile (Default) > Edit Profiles > Window` and make the following changes: 

- **Transparency**: 15 - 20 (make sure to enable 'use transparency'). 
- **Blur**: 10 - 15. 

I really love this change, it makes out iTerm2 window look a bit like a glass. 

**Colors**


Navigate to `Profiles > Pick Profile (Default) > Edit Profiles > Colors` and make the following changes: 

- click **Color Presets**: Pastel ( Dark Background )

Your terminal should look something like this: 

![iTerm2 with custom settings](https://i.postimg.cc/W1hbJybK/ezgif-com-resize.gif)

---

I haven't changed anything else at the moment, but by all means, feel free to change whatever color setting you want. 
I mean... who doesn't want a terminal looking like Buggy the Clown? 

![Buggy the Clown from One Piece](https://media.tenor.com/UjQkCTOcuTIAAAAd/buggy-one-piece.gif)

### Wrapping it up

With the tools and knowledge in your arsenal from this guide, the door to terminal experimentation is now wide open. It's exhilarating to see just how deep the rabbit hole of iTerm customization can go. My hope is that this article sparks an itch of curiosity within you. Don't just stop here; venture further, tweak more, and discover the full spectrum of personalization iTerm offers. Dive in, play around, and let your terminal truly be an extension of your coder/hacker persona. Here's to endless exploration and customization! 🍻

## 🚀 Spread the Love & Support the Realm

Hey there, fellow Realmer! If this guide illuminated a new path in your coder/hacker journey, your support would mean a lot. Every bit of magic helps

👑 **Crown & Share**: If you found value in this post, please give it a crown and share it with your fellow code/hacker enthusiasts. Spreading knowledge is what Sudorealm is all about! *Fun fact the Author with the most crowns inside a realm will be crowned as the Realm King!* 🤴

🛍 **Affiliate Treasures Below**: Dive into the depths below the post to uncover some affiliate products I've curated just for you. It's a great way to support the realm and discover some nerdy treasures.

🐦 **Twitter/X Shoutout**: Feeling extra grateful or have some cool feedback? Drop me a shoutout on Twitter – I'd love to hear from you!

☕️ **Coffee Driven Development**: Enjoyed the content? Help keep my coding sessions energized with a cuppa! **[BuyMeACoffee](buymeacoffee.com/ZixcW8N)**

Thanks for being a part of our realm. Every bit of support propels our community to new horizons. Until next time, keep exploring!

I am [@d3ad R1nger](https://sudorealm.com/blog/profile/d3ad-r1nger), Creator of Sudorealm, thank you for reading.