Solved

linux : setting bash prompt in linux to - yellow Bold / red Bold

Posted on 2014-11-12
9
343 Views
Last Modified: 2014-11-23
I would like to set bash prompt for my dev server and prod server.

for dev server I would like to be yellow+bold+ bright.

I tried my best and partly achieved using below settings.
--------- -----------
PS1="\e[1;33m\u : \w> $ \e[m"
------------------------- -------
but I need this color to be more Bright + Yellow.
for your more understanding my required color , please refer the attached file, where few info messages at the top, are displayed in yello+bold+ bright. I wanted that be same for my prompt.

so please advice for
1) how to set PS1 value , yello+BOLD+ bright, shown in the screenshot
2) how to set PS1 value   Red + BOLD + bright,
3)  how to set permanent settings

please advice for the above queries
 
waiting for your reply
C--Users-agori-Desktop-22.png
0
Comment
Question by:mac_g
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 4

Expert Comment

by:mbertl
ID: 40439293
Hi,
with 1m, you already set it to be bold, and AFAIK there is no 'more bold'. Because there are only 16 Colors to choose from, you only have that red and that yellow. If you have a graphical Terminal, like gnome-terminal, you can slightly change fonts and colors, if you have text login, you already have whats possible.
for 2): yellow is 33m, red is 91m.
For 3): you add your "export PS1..." to ~/.bashrc and you have your prompt with every login.
0
 

Author Comment

by:mac_g
ID: 40439300
Thanks for your reply ..
please refer to attached screenshot, what exact yellow colour ( info text messages in terminal)   I am looking for.
same  for RED too

waiting for your advice.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40439322
If you use putty there is no difference between bold and flat font.
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:mac_g
ID: 40439325
I cant use putty.

having this environment, can you please advice  how can I achieve my objective
0
 
LVL 4

Expert Comment

by:mbertl
ID: 40439443
You could try all different numbers to find out, which number your required color is. Since there is no specific documentation for that from the developers, its the way i would do it.
0
 

Author Comment

by:mac_g
ID: 40439590
any idea how to increase  font size  for the PS1
0
 
LVL 4

Accepted Solution

by:
mbertl earned 500 total points
ID: 40439595
You only can increase the font size, if your Mobaterm has an option for that. Under "Settings/Configuration/Terminal" you can change Font and Fontsize, as well as the color theme.
0
 

Author Comment

by:mac_g
ID: 40439602
it will effect all  screen.

just I need to have effected to PS1
0
 

Author Comment

by:mac_g
ID: 40461506
I've requested that this question be deleted for the following reason:

not getting satisfactory reply
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question