How to Change the Window Title in Terminal (zsh + oh my zsh)

A window title that you can customize.

So in MacOS Catalina, the terminal kept screaming at me to update to zsh. That’s what I did. But then, my personal name and some other personal information became the title of the window.

I’ve recently started writing on Medium and I don’t want to accidentally screenshot my personal stuff. So, the first step I had to take was change the terminal window title.

With bash, you could simply just open Terminal Preferences and set the window title. But with zsh, paired with oh my zsh, the window title becomes your username and the current directory…

Here is how you change the terminal window title.

  1. Type open ~/.zshrc. Then hit enter. (Or vim ~/.zshrc, if you prefer vim)

*Update* If you’re getting a “File does not exist” error, you may first have to create .zshrc manually like this:

touch ~/.zshrc

2. TextEdit (or vim) should open. Now, search for DISABLE_AUTO_TITLE=”true”

This is what your mac should look like.

3. Now, delete the # in front of the DISABLE_AUTO_TITLE=”true”. Then press Command + S to save. You can close TextEdit now.

4. Go back to terminal, and type source ~/.zshrc.

5. Now, open terminal preferences by pressing Command + ,. Then, head over to “Profiles” and then “Window” (Shown below).

6. Now, type whatever name you want for the terminal title! Also, uncheck:

  • Working directory or document
  • Active process name
  • Shell command name
  • Profile name
  • TTY name
  • Dimensions
  • Command key

7. Now, close terminal by pressing Command + W. Then, open terminal again, and your title should be whatever you set it to be!

--

--

--

WWDC21 Scholar. I like to read manga and write about Swift. Check out my app, Find — look for text in real life, with outrageous speed. getfind.app

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CheerpJ 2.3 released

Django Rest Framework Tutorials with JWT Authentication. (Expense Income API Project)

Building a multitenant service

i.MX8MP Compiles DPDK Source Code to Realize rte_ring Lock-free Ring Queue Inter-process…

Why Your Lambda Functions May Be Doomed To Fail

git flow makes branching easy

Redesigning My Network

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Zheng

Andrew Zheng

WWDC21 Scholar. I like to read manga and write about Swift. Check out my app, Find — look for text in real life, with outrageous speed. getfind.app

More from Medium

Mac terminal commands — Part 1

The iPad Needs a Better Operating System

Opening .sh files in macOS Terminal to convert to .ISO for Windows 11 on M1 Mac

How to enable Terminal and GIT autocompletion on MacOS Catalina and higher.