I love Linux Mint's bash customization. It includes both a color prompt and a quote displayed with ASCII art.
Is it possible to have it in Ubuntu?
I love Linux Mint's bash customization. It includes both a color prompt and a quote displayed with ASCII art.
Is it possible to have it in Ubuntu?
The file
~/.bashrc
allows you to make the customizations you would like, among other things.First open it with
gedit ~/.bashrc
Now in order to have the multicolored prompt, find the line that looks like this:
#force_color_prompt=yes
Un-comment it (remove the
#
).Now to get the ascii art and quote, you will need to install two packages:
sudo apt-get install cowsay fortune
Now in
~/.bashrc
add a line with:fortune | cowsay
Save the file, and restart your terminal (or resource the file with
source ~/.bashrc
).The custom setup is done in
/etc/bash.bashrc
on Linux Mint 11 - if you download the .iso you can mount that as a loop device on Ubuntu and copy/paste the text, which is quite large, but you should be able to paste it into your~/.bashrc
.One nice feature is that the prompt changes to red when you are root.
There will also be some setup for the GNOME Terminal application to make the background be white - you can do that through the Terminal preferences.
If add the following to your .bashrc file, you get color-coded date, time, username, hostname, and the current directory. Most importantly, you get the entire line to type your command.
Instead of customizing
~/bashrc
file manually, simply use Gogh script for the customization of the entire color scheme forGnome
terminal.The Gogh library provides dozens of different color schemes which can be installed by simply running a single command and restarting the terminal.
For instance, the following command will change the color scheme to light,
DEMO
Please visit on the following page for the list of all the available Color Schemes and their demonstration,
https://github.com/Mayccoll/Gogh/blob/master/content/themes.md
Yes, It's possible. Just open up your .bashrc file with any Editor(ex: nano, vi and etc.).Then scroll down to this line of code.
if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '...........
Then comment out the current PS1 variable (If you want to use it later).Then add Mint prompt instead of that. Just paste this right below that.
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[01;34m\]$ '
Then save it and reopen up the terminal. You'll see the changes.
Have you seen the bash prompt of parrot os??
I found it very cool.I have uploaded bash prompts for both root and normal users in Linux Mint to my Github account. Here's the link to my repo. I have added the screenshots there. Just like first modification, now use the following variable instead.
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\[\033[0;35m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;35m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;35m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;35m\]]\342\224\200[\[\033[01;32m\]\w\[\033[0;35m\]]\n\[\033[0;35m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\] "
Reopen up the terminal, then you'll see this, Hope you found this answer useful.