I want to display a message showing "welcome to terminal" whenever I open a terminal. Any ideas?
2 Answers
.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.
-
Note that
.bashrc
is also executed when you open anotherbash
inside the existing terminal. So it isn't a 100% match of the specification. Mar 19, 2015 at 11:49
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.
-
A better option would be
echo " Ramana Reddy " >> ~/.bashrc
..no need to open the file..– heemaylMar 19, 2015 at 7:47 -
-
@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" ;-)– FabbyMar 24, 2015 at 14:29