Bash (Bourne again shell) is a shell that offers many features and many commands, one of the best shells at the moment, today we see how to set up a banner welcome to its opening.
This is my banner, now we'll see how to change it
Open the .bashrc file
[Bash uses the scripting language "sh"]
From the terminal type gedit .bashrc (not visible in Nautilus or Dolphin) in the folder ~ (/ home / user), go to the bottom and leave a space, comment with "#" what we like and like to make it clear that this is a piece of code dedicated to the banner
this is the code I "wrote" (a series of commands)
# Opening Banner powered by: COWSAY & FIGLET! figlet -f big Bash Console echo "" echo "*** COW SAY ***" cowsay "Welcome Back!" echo "" echo "*** RUNNING KERNEL ***" uname -s -r echo "" echo "Welcome Back $ USER at $ HOSTNAME's bash console! :)" echo "Happy to see you! Hope u will have great day ! " echo ""
obviously you can use any desired command, it will be executed as a welcome message
you can use the attributes $ USER or $ HOSTNAME to make you welcome, echo to print messages on screen (between the quotes), uname for the kernel version, any command to print something on screen is fine, even programs downloaded from apt-get they are fine (see cowsay and figlet), but at the moment of opening, not only will you be able to make them print on screen everything you want, you can also make them do conditional operations (if - else), cycles (while - for) and commands not visible to the user (for example if we execute the command
export $ (dbus-launch)
We tell bash to start the DBus server, but it will not return any output, only internal operations will occur.
I hope the article was to your liking 🙂