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

Popular posts from this blog

aes,gpg,encrypt, man etc

-Who is the most controversial man in the world recently? -Definitely it's Julia Assange . WikiLeaks had released a package of file encrypted with AES. What shall we do right now? yeah! download it and wait for the passphrase! So let's have a little try at encrypting in Ubuntu. GPG  here is sample file another_file. 1.gpg -c filename enter a passphrase.Now the file is encrypted. 2.gpg filename.gpg AES     Download AESCrypt here.     extract the package with         tar xzvf filename     then         make         sudo make install     I haven't tried aescrypt yet. But you can make it with a simple command. Just go to their home page. Others things: Chinese man page. while downloading source file of aescrypt, i found that they provide a manpage file. So making 'man aescrypt' working in terminal became a problem. After goo...

BACK HERE!

it has been a long time Since 2006 i set my blog at blogspot.com. i have tried other services such as wordpress, typecho, hexo, hugo etc because google had been blocked in 2008. Just tired of buying vps,install database and install blog applications. Get back here to stay simple.

考试

公考成绩出了...发挥很稳定,和大四第一次考的成绩一样。排名23,还不错,今年有好好复习的动力了。 本周考职称外语,四月份考会计从业资格证,五月的计算机中级不知道要不要报名.. 今年肯定是考试的一年。