
You can add a new line with the text PROMPT='.' and include relevant values in the ellipses.įor a simple modification to the zsh prompt, you can type these values in the. It’ll be blank if you’re accessing it for the first time. Open Terminal, type the following command, and hit Return: nano ~/.zshrc To make any change to the default zsh prompt, you’ll have to add relevant values for the prompt to appear differently than the default.

%1~ means the current working directory path where the ~ strips the $HOME directory location.These details are stored in the zsh shell’s system file at the /etc/zshrc location. Typically, the default zsh prompt carries information like the username, machine name, and location starting in the user’s home directory. All the changes you want to make to the zsh prompt can be included in this profile. However, it won’t be active in the SSH sessions. Here’s a guide on how to see hidden files on your Mac.Īfter that, the zsh profile will be available for the login and interactive shells every time you launch Terminal. You can see it under the /User// path in Finder, if you have enabled viewing hidden system files. zshrc profile in your user account’s home directory. Type the following command and hit the Return key: touch ~/.zshrc.Here’s how to create the zsh profile (dotfile): zshrc profile is recommended to store all the settings like the zsh prompt looks and behaves. Well, you won’t find this dotfile by default on macOS, so you’ll have to make one. So you can create a specific settings file, known as a dotfile, for your zsh profile to store all the changes and settings you want in the zsh prompt. That’s because macOS updates reset all the system files to default, and you will lose all the changes you make. Typically, you have to tinker with the system files to change the default look.

Create a Z Shell Profile to Store All Settings
