• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoLinux ApplicationsHow to display or change a welcome message in pcDu ...
Previous Next

How to display or change a welcome message in pcDuino Ubuntu terminal

Posted by: Yang , July 16, 2014

Question: I want to show a custom welcome message inside Linux terminal whenever I open a new terminal window. How can I do that?

It is extremely easy to add a plain-text welcome message in Linux terminal. All you are have to do is to include echo command in your shell startup file.

For example, if you are using bash, you can edit ~/.bashrc script, and add echo command at the beginning of the script as follows.

$ vi ~/.bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

echo "Welcome to pcDuino worlds"
. . .

2010-01-01-010424_660x464_scrot 2010-01-01-010404_660x464_scrot

At this point, whenever you open a new terminal window, the message will appear inside the terminal window.

A custom welcome message can be used to spice up your terminal window. For example, here is a simple tip that makes a random quote appear inside your Linux terminal.

We use a combination of two command-line tools: fortune and cowsay. The former tool prints out a random interesting adage, and the latter utility displays (literally) a speaking cow in terminal window.

First, install fortune and cowsay on Linux.

On pcDuino Ubuntu :

$ sudo apt-get install fortune cowsay

Then add the following line at the beginning of ~/.bashrc.

$ vi ~/.bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

echo "Welcome to pcDuino worlds"
fortune | cowsay -pn
. . .

That’s it. Now go ahead and open a new terminal window. You will see something like this in your terminal window.

2010-01-01-010836_660x464_scrot 2010-01-01-011402_660x464_scrot

Tags: Linux Applications

Share!
Tweet

Yang

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors