Home > Software engineering >  Mac Terminal symbol break down
Mac Terminal symbol break down

Time:10-18

I just opened my terminal to find someone random's iPhone name after the @ sign

oliviaporter@Maxs-Iphone ~ %

I realized that this A - isn't an immediate issue as it looks like there are a lot of solutions to resetting the host name and B - that I don't actually know what the symbols mean. So my first questions are what is the @ sign telling us? what is the ~ and the % sign telling us? My second question is how did this get connected to "maxs Iphone" in the first place?

And if there is too simple of a question, can someone point me in the direction of documentation?

CodePudding user response:

This is the traditional shell prompt.

It shows $USER@$HOSTNAME, where the @ separates the user name from the hostname. It is followed by your current directory, and in this case, it uses the ~ shortcut for your $HOME directory. You can also show it with the pwd (Print Working Directory) command or with the $PWD variable (try echo $PWD).

The % at the end is the traditional zsh prompt. (Bash generally uses $ or # if you are logged in as root).

  • Related