A valuable tip for DevOps – You should easily recognition on what server are you in, using ssh connection and terminal. The simplest way is to change prompt color to red for a production server. For the tutorial purpose, I will use my host as test env and test as prod Rules are the same.
Download and install this script.
This is Linux script to install tool such as oh-my-bash. Here is the official site.
The next step that you must do is to choose what theme you would like to use. I suggest you „agnoster”. To make this happen, edit file ~/.bashrc, find the line and change it:
OSH_THEME="agnoster"After done this steps you will see new terminal:
So that will be look like our terminal when we working on dev (test) server. This same actions you must do in prod env, plus additional point. Change color to red.
Find path end edit file nano .oh-my-bash/themes/agnoster/agnoster.theme.sh. Change line 106, 120 to make them look like this:
Yes yes, I know that this is not the perfect way to change settings. I do not know how to professionally done this, but it works If you can do this better, please tell me how in a comment below.
Finally effects:
If your terminal did not look like the picture, you may be missing the font. You will find it here (CascadiaCode.Nerd.Font.Complete.ttf), set as default in the system or terminal.