For example, in Ubuntu when I start up a terminal, it says:
And in Windows:
Is there a formal way to refer to that text?
Thanks in advance!
It's called 'the prompt'
In linux, you could be more specific and say "the bash prompt" in the case of the bash shell, or for the KSH shell, The KSH (korn shell) prompt etc. In Windows you can change the prompt with the PROMPT command.
In windows, you could be more specific and say "the C prompt", and the prompt in windows is most famously
|show 2 more comments|
Hopefully this further info is useful to you (or someone else).... You can view/set "the prompt" via the PS1 environment variable.
To see what the current prompt is set to...
To set the current prompt to something else...
To see the many parameters that can be used to customize a prompt...
also notable in linux
the prompt ending in $ denotes a normal shell
the prompt ending in # denotes a root shell (carefull!)