To display a message every time you open the terminal, follow the following steps:
1: set up your ~/.bashrc file for customization by making it include your own custom ~/.my-bashrc file.
2: use echo in .my-bashrc to display the message.
echo Hello, how can I help you?
Note: this doesn't work through SSH because .bashrc isn't sourced when you SSH, but you can fix that by editing your .bash_profile to source .bashrc. [https://stackoverflow.com/a/820533 (accessed 2025-07-07)].
Note: the message displayed to users when they open the terminal is sometimes called "Message of the Day" or MotD for short. It's possible to configure this for all users through /etc/motd, but it requires root. If all you want is to show a message when you open the terminal, you don't need to change system configuration files, all you need to do is edit your .bashrc.
How to Display a Random Message Every Time You Open the Terminal
The echo command is cool, but it always prints the same thing. What if we want to display a random message on the terminal every time we open it? In that case, see: