Some time ago elav spoke to them about how to improve the appearance of the console, and many of us served.
Well, in this article I will leave you an update to the aforementioned, that is ... the same but with colors 🙂
Here's an example:
As you can see, not only does it have the timestamp of the execution of each command, but it also has colors 😀
To have your terminal like this it is quite simple, I leave the steps:
1. We open a terminal, in it we put the following and press [enter]:
cd $HOME && wget http://paste.desdelinux.net/paste/?dl=109 && mv index.html\?dl\=109 .bash_ps2
2. Now we must edit the file .bashrc located in our personal folder (our home). Press [Alt] + [F2], we write the following and press [enter]:
kate ~ / .bashrc
* NOTE *: I put «kate»As it is the text editor of KDEif you use Gnome change «kate" by "gedit«.
3. Let's add the following lines to the file that will open:
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
fi
if [ -f "$HOME/.bash_ps2" ]; then
. "$HOME/.bash_ps2"
fi
4. Let's save the file and close it.
5. We close all the terminals (consoles) that we have open, and we open a new one ... everything should be as they wish 😀
Ready…
Leave any doubt or question, complaint or suggestion here 😉
regards
You can also add the parameter "-p" to the "–color-auto" to make it look even more beautiful (: What -p does is put a / to the folders, xDDDD greetings
wow thanks, i didn't know this 😀
I already put it, another tip to save 😉
regards
This one is mine. a little simpler:
PS1='\n\[33[1;35m\]\342\226\210\342\226\210 \u @ \w\n\[33[0;35m\]\342\226\210\342\226\210 \t $ \[33[0;39m\]'
Eh gritty for pacman to have the colors like yaourt you install pacman-color and then add
alias pacman = 'pacman-color'
alias sudo = 'sudo'
in .bashrc
http://imageshack.us/photo/my-images/20/pantallazode20111222144.png/
I had my nice bashrc, but buehh, hahaha it's time to tune it again and then I upload it to mediafire for the next one I won't be looking for info.
PS: I don't like that script 😀
No thanks, pacman-color sometimes when pacman is updated, it annoys or prevents the latter from being updated.
Sure, I see !! as it is so difficult to solve this problem, better flight to my terminal to uninstall pacman-color 😀
First of all, I use Pacman to manipulate the packages, not to color the installation haha, the colors I am talking about here are for other things.
However, I do not use pacman-color because once it gave me that little problem, and I stopped using it at all because in the end it did not attract me enough, it does not increase performance, it does not make downloads faster or anything similar, it is just a little blush and nothing more.
I removed it and threw it away for my box with sand, and to hell 😀
Well, I know what are the differences between enchular the promt and the pacman-color. And I use it when looking for a package or seeing what I have installed, the colors make the task easier.
Trashy docs hahaha I can imagine the love letters there hahahahaha
HAHA don't be nosy…. HAHAHA
Does anyone know how to do this in kde?
http://nachxs.files.wordpress.com/2010/06/archlinux2.png
That has ArchBang as standard so could be own ArchBang
It is a script called archey, if you look above they enter the name of the script and that info comes out with the arch logo in ASCII.
OK thanks.
I get the following error at the ubuntu terminal prompt:
: order not found
: invalid signal specification
bash: /home/cristian/.bash_ps2: line 14: syntactic error near unexpected element `$ '{\ r»
'ash: /home/cristian/.bash_ps2: line 14: `function prompt_command {
What could this error be? can you help me fix it?
This simple solutions in the terminal excites me, I come to leave my promp tutifruti:
PS1=»\n[\[\e[1;31m\]\@\[\e[0;0m\]][\[\e[1;33m\]hist:\!\[\e[0;0m\]][\[\e[0;35m\]com:\#\[\e[0;0m\]][\[\e[0;31m\]\h\[\e[1;34m\]@\[\e[0;33m\]\u\[\e[0;0m\]]\[\e[0;32m\]\w\[\e[0;0m\]\r\n$ »
PS2=»\[\e[0;30m\]>\[\e[0;34m\]>\[\e[1;34m\]>\[\e[1;36m\]>\[\e[0;0m\] »
and an alias: alias ll = 'ls -lhX –group-directories-first'
to have the folders at the beginning of the list
Good site. I just arrived and I already read about five articles.
Well when editing .bashrc you don't need to close all consoles and open
a new pair to appreciate the changes. Just type:
source .bashrc
and bash will read the .bashrc and activate the new content.