By default the prompt that you see on your Mac Terminal is as,Syntax:
logged-in-username@Mac-device-name Current-Directory %
c2cdev@C2cs-MacBook-Pro Desktop %
Note that the default shell on macOS is ZSH and not Bash.
If you want to change the way the prompt looks, you can do that by adding the PROMPT details in the .zshrc file.
Steps to Change macOS Terminal Prompt:
- Open Terminal App
- Type zsh and press enter to make sure to are in the ZSH Shell.
- Now type nano ~/.zshrc to open this fine in Nano text editor.
- Add the below line line in the file and save and exit.
PROMPT="macOS %% "
You can add any text you want here, even an emoji 🧑🏻
Now Press Control + X followed by Y and Enter.
- To apply changes type source ~/.zshrc on the prompt and enter
- You will see that the prompt has changed to macOS %
This is not an AI-generated article but is demonstrated by a human on an M1 Mac running macOS Sonoma 14.0.
Please support independent contributors like Code2care by donating a coffee.
Buy me a coffee!
Facing issues? Have Questions? Post them here! I am happy to answer!
- Clear Screen shortcut macOS Terminal
- What is macOS Ventura?
- [fix] How to Show file extensions on all files on Mac
- How to Find Where Mac Terminal App is Located?
- AutoSave button not working on Office on Mac (Word, Excel or Powerpoint)
- macOS say command text to speech using various voices and languages
- How to change Ping TTL value on macOS
- Open .bash_profile File in TextEdit using Terminal
- How to know the Safari Version on Mac
- How to Copy full Absolute Path of a File on Mac
- 13.0 MacOS Ventura release date
- Enable spell check in Sublime Text (macOS)
- How to Display Analog Clock on Mac Menu Bar
- How to turn off Location Services macOS Ventura 13
- How to Open VS Code on Mac
- Add Bookmark macOS Safari
- How to Fix cd: too many arguments Error in Terminal: A Step-by-Step Guide
- How to install wget on macOS
- Select Line Number TextEdit on Mac
- Strikethrough Text in Excel for Mac
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to hide or display Wifi icon in macOS Bug Sur Menu Bar
- How to install Yarn on Mac (macOS)
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to Schedule Mails in macOS Ventura
- 3 Commands to stop Nginx Server - Linux
- Fix: java.util.regex.PatternSyntaxException - Java
- Send Email using SharePoint PowerShell command, SMTP server - SharePoint
- Python: How to rename Index Names Pandas DataFrame - Python
- Okta Hacked - Source Code Stolen from GitHub Repo - News
- How to know docker Engine details - Docker
- [fix] Java Spring Boot JPA SQLSyntaxErrorException: Encountered user at line 1 column 14 - Java
- How to calculate SUM in Excel on Mac with Examples - Microsoft