Adding a Hamster Face to the Bash Prompt

Joyce Lin
1 min readJul 4, 2016

--

If you’re going to be spending a lot of time in your Terminal, might as well make it hospitable. Here’s two easy steps to customize your bash prompt with a hamster face, or any emoji of your choosing:

Open .bash_profile

Use your preferred text editor to modify the .bash_profile document.

subl ~/.bash_profile

Add PS1 variable

Add a new line in the .bash_profile document for the PS1 (Prompt String One), the environment variable for the bash prompt.

PS1=" "

Inside the quotes, add the emoji character of your choosing. Copy and paste the emoji, or use Ctrl + Cmd + Space on Mac to open up the emoji keyboard.

For additional customization, add other useful info manually, for example, the current directory or hostname, or use a bash generator to easily select and configure these elements. Remember to leave some space before or after your emoji, depending on the placement, for breathing room.

Save your changes, and open a new terminal window to bask in the fruits of your labor.

--

--