So how to change the color and add the current path? We need to know some color code. We can enter any command, you will find the only thing that changes is the user name. Save and exit, use source command to active the ~/.bash_profile settings. ( Different scripting languages have different configuration files.)įor example I can use vim editor: vim ~/.bash_profileĪnd set PS1: export PS1="My name is Clay: " bash_profile file in your user directory, you can create it by yourself. In Mac OS, the user name in terminal have no any color, but we can set PS1 to fix it, even add the current directory path. More info: Change default shell script zsh to bash) because I change the default scripting language from zsh to bash. (Note: The default interactive shell is now zsh. In here you can select the default terminal, text, color, ANSI basic color, terminal cursor color and shape… etc.Īfter the setting is complete, you should have the terminal appearance you wish to have: Or you can use command +, to open the setting window. Open your terminal and select the top option “ Terminal“. the terminal display text color via ls commandįirst we can use graphical interface to configure.The following is divided into several parts. I share my configuration method in below, maybe one day I can come back to refer my own configuration. We need to do something to make Mac OS default terminal more beautiful. There is a sense of collapse of “ Oh my God I need to configure it again…“įor a simple comparison, I have beautiful colors and file sorting in my remote Linux server:Īnd my MacBook’s Terminal.app shown: And I can’t even see the text After getting used to the Linux terminal with rich colors (I used to spend a lot of time adjusting it), I suddenly switched to the white background Mac default terminal: Terminal.app, and I felt uncomfortable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |