3

I want to display a message showing "welcome to terminal" whenever I open a terminal. Any ideas?

1

2 Answers 2

4

.bashrc is your best friend for that approach.

Since .bashrc is linked to your account when you reached to your desktop after booting up. When you open your terminal, the system will go through .profile then .bashrc for any specific instructions prior having the terminal ready for your use.

So, you can add echo "Hello world, and you!" at the last line of your .bashrc without editing anything in that script, and there it is...your terminal bows to you.

1
  • Note that .bashrc is also executed when you open another bash inside the existing terminal. So it isn't a 100% match of the specification. Mar 19, 2015 at 11:49
3

Open your terminal and paste as

gedit ~/.bashrc

write as

echo " Ramana Reddy "

at last line , save & close. Close your terminal and open it again.

NOTE: dont touch any other lines in .bashrc.

3
  • A better option would be echo " Ramana Reddy " >> ~/.bashrc ..no need to open the file..
    – heemayl
    Mar 19, 2015 at 7:47
  • He must know about .bashrc file
    – Raja G
    Mar 19, 2015 at 8:27
  • @RamanaReddy: Don't thank Raja! ;-) If you like his answer, just click the little grey under the abysmally small number now turning it into beautiful green. If you do not like the answer, click on the little grey down-arrow below the number, and if you really like the answer, click on the little grey checkmark and the little up-arrow... That is a much better "thank you" to Raja than actually writing "thank you" ;-)
    – Fabby
    Mar 24, 2015 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .