1 min read

Useful commands for your Mac

Useful commandline utilities for your Mac

Terminal is one of my favorite applications in the Mac and I've been getting familiar with zsh. This post is a living post where I will keep updating what I learn on the commandline.

Update hostname

What's the hostname? The word that shows up right after your username if you open "Terminal."

mac OS used to update the hostname when you update the Computer Name:

Settings > General > About

Or under Sharing

Settings > General > Sharing > Local hostname

At least in mac OS 14.3.1, when you update any of these places, it doesn't sync to zsh.

You can use the following command to change it

scutil --set HostName <hostname>

That should update it on zsh.

I am hearing some good things about Oh My Zsh. However, I've not checked it out myself, yet.