How to hide computer name in OSX terminal

Dany ParedesDany Paredes
1 min read

I love to have a clean terminal, the name of the computer is a piece of information not relevant to read every single time.

Terminal without the computer name

I'm still using the bash shell.

echo "export PS1='$ '" >> ~/.bash_profile
. ~/.bash_profile

For zsh users add the following line into the .zshrc.

PS1="%n$ "

:)

0
Subscribe to my newsletter

Read articles from Dany Paredes directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Dany Paredes
Dany Paredes

I'm passionate about front-end development, specializing in building UI libraries and working with technologies like Angular, NgRx, Accessibility, and micro-frontends. In my free time, I enjoy writing content for the Google Dev Library, This Is Angular Community, Kendo UI, and sharing insights here.