![]() ![]() If you use this technique for other purposes, exceptions may also occur.Īt present, we have only changed the contents of bash command prompt. This technique is only used to hide commands from the command prompt“ ”Part, that’s all. Some unexpected problems may occur at this time. For example, a shell like Zsh will inherit the settings of the current shell. Warning: in some cases, this practice is not recommended. If you want to operate as simple as possible without messing up your ~ / Bashrc file, the best way is to create another user in the system (for example“ ”、“ ”)。 If you use a user with such a command prompt to take a screenshot or record the screen, you don’t need to worry about your user name or host name being seen by others. Now look at your terminal“ ”Some have disappeared, only one ~ > Mark. ![]() Let me give some examples.īefore starting, I strongly recommend that you back up ~ / HRC file. Just insert some special escape strings starting with backslashes, and you can modify the command prompt as you like. ![]() In the default display form shown in the figure above, “SK” is my user name and “Ubuntu server” is my host name. Generally, the bash command prompt will be in the following form: In Bash, we can customize the bash command prompt by changing the value of the $PS1 environment variable. Although many plug-ins or tools can easily meet this demand, we can also manually customize some basic display methods without using plug-ins and tools, such as adding or modifying some elements, changing the foreground color, changing the background color, etc. This article will show you how to customize the display of bash command prompt by adding colors and styles. As we all know, bash (the B ourne – a gain sh ELL) is the default shell used by most Linux distributions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |