Fancy and useful bash prompt

Is your old bash prompt a bit “outdated”? Ok, let’s give it some spice.

Open your


/etc/profile

and throw the following line in (no linebreak):


export PS1="\[\033[1;32m\][\$(date +%H:%M)]\[\033[0;36m\][\u@\[\033[0;31m\]\h:\[\033[1;34m\]\w]\[\033[0m\]"

Save, close the file and issue the following command:


source /etc/profile

What do you get? Well…something like this:


[18:05][root@moveaway:/home]

It’s:


[HH:MM][user@hostname:/current_dir]

Have a nice and colorful day!

Shell history stats

root@salotto:/home/zarrelli# history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
70 ls
56 cd
40 apt-get
39 dig
22 dpkg
18 make
17 ssh
16 cat
16 apt-cache
15 vi
root@salotto:/home/zarrelli#

Giusto per non farci mancare un meme

[Via Planet Ubuntu]

E’ che non so resistere…


root@salotto:/var/log# dpkg-reconfigure xserver-xorg
/usr/sbin/dpkg-reconfigure: xserver-xorg è rovinato o non completamente installato
root@salotto:/var/log#

Ahem…si…lo so, uno non dovrebbe riconfigurare il server grafico in una console, mentre nell’altra sta eseguendo un dist-upgrade.

E’ che non so resistere…