Skip to main content

a little fun with bash

The fun of Linux is that you can configure it as you want.
This post is about some config i made.

1.color
Screenshot-color
  • vim ~/.bashrc
  • add this line: 
  PS1='\[\033[1;32m\]\u\[\033[1;32m\]@\h >>\[\033[0;34m\]\w\$ \[\033[1;36m\]'
  • save and quit.
  • close the terminal and open a new one. Now it's colored.
more HowTo and color in here.
2. show somthing open opening terminal (like the Linux Mint)
  • vim /.bashrc
  •  add command lines
  • save and quit.
examples:
1.calendar
 add /usr/bin/cal in .bashrc.
Screenshot-calendar
2.fortune
sudo apt-get install fortune-zh  (for others languages, aptitude seacrh them)
add  /usr/bin/fortune-zh in .bashrc.
Screenshot-fortune
3.cowsay and others
sudo apt-get install cowsay 
add fortune-zh | cowsay  in .bashrc.
Screenshot-cowsay

Comments