change terminal name mac

0

I wanted to know if there is a way to remove all the name that appears in the terminal, it uses a lot of space. I have it like this:

and I would like to see something like this.

    
asked by jeancarlos733 10.12.2016 в 17:30
source

2 answers

2

You can follow these steps:

  • Open the terminal.
  • To change the Primary hostmame, example: mimac.domain.com

     sudo scutil --set HostName <new host name
    
  • To change the Bonjour hostname, example: mimac.local

    sudo scutil --set LocalHostName <new host name>
    
  • To change the name of the computer.

    sudo scutil --set ComputerName <new name>
    
  • Empty DNS cache:

    dscacheutil -flushcache
    
  • Restart the computer.

  • If you have any questions, you can read this article: link

        
    answered by 10.12.2016 в 17:43
    0

    You can go to your file .bash_profile and enter this line:

    • export PS1="\W \$ " shows you ~ $

    • export PS1="\W jean \$ " shows you ~ jean $

    After saving this line you have to restart the terminal.

        
    answered by 10.12.2016 в 18:06