In today’s article, we’ll teach you how to create a custom welcome message in your terminal. This could be useful or playful. What you do with this power is entirely up to you. After all, that’s the whole point of ‘custom’!
It’s not terribly difficult and there’s some fun to be had with this exercise. Basically, we’ll be making it so that you get a custom message (including action) that is output whenever you open up a new terminal.
You can make the terminal do all sorts of things by editing your ~/.bashrc file. That’s how we’ll create a custom welcome message in your terminal. It’s not dreadfully difficult but it will help make your system feel like your own and, to some people, that’s one of the greatest things about Linux.
So, how about I show you how I customized my welcome message in the terminal? You can use my example as a brief template to use yourself, when you create your own custom welcome message. It’s something even a new Linux user can do!
Create Custom Welcome Message
The file we’re going to be using for this is .bashrc, located in your home directory. So, the path to that file will be ~/.bashrc. If you don’t know, dot files (those starting with a period) are considered hidden. Unless you’ve opted to do so, these files will not show up in your file manager. We can still access ’em just fine in the terminal, when we use their path.
The tool we’re going to use is ‘nano‘. It’s an acceptable tool for this, and many other things, but you could just as easily substitute a GUI text editor. In this case (so long as you can see the hidden files) you don’t need to edit in the terminal – and you don’t even need to use ‘sudo’ for anything, because the files you’re editing belong to you in the first place!
Let’s get to editing – as it’s easy and I need to show only a couple of commands in order to demonstrate the feature. We’ll do it in nano, of course. That requires an open terminal, so just press
With your terminal open, enter the following command:
Once that’s open, add the following lines:
# My custom welcome message
echo "Welcome to the terminal, Master. How can I help you today?"
Then you’ll save that with nano – which is done by pressing
That reloads the changed file. Close your terminal and open it again to see the new custom welcome message. In this case, it’d look a bit like this:
Obviously, you can customize those two commands, add more commands, and generally craft the custom welcome message you want to see when you open the terminal.
Just remember… You have to save the changes and then you need to reload the changes with
source ~/.bashrc in order to make sure they work. You have to save the changes and reload the source with every change. You’ll see the changes when you next open the terminal. The two commands I chose should be self-explanatory, you can use them as an example for the commands you want to use to make your custom welcome message.
There you have it, another article said and done! This one shows you how to make a custom welcome message in your terminal. Is this a useful skill? Well, not necessarily – but it is a way to make Linux a little more your own. It’s an easy way to customize Linux. Enjoy!
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.