ttys003 on mac bash

Shell
sudo scutil --set ComputerName "newname"
sudo scutil --set LocalHostName "newname"
sudo scutil --set HostName "newname"

Source

Also in Shell: