LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2015, 12:01 PM   #1
robgeek
Member
 
Registered: Oct 2013
Posts: 37

Rep: Reputation: Disabled
Question about Terminator configuration.


Hello!

I'm using Terminator and Arch Linux and i would like to hide my username and local folder when i'm a user and superuser. I know how to do that when i'm a user. I put "export PS1="> "" in "~/.bashrc" and it works fine, but i would like to set another color for "> " when i change to superuser and i don't know how to do that.

How can a do that?

Thanks!
 
Old 07-31-2015, 04:10 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,270

Rep: Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625Reputation: 1625
You can find many guides on how to customize the prompt.

There are actually 4 different prompts i.e PS1-PS4. PS2 is the secondary prompt which already uses ">" as default. If not changed will be white so technically you could tell the difference but if not paying attention you could easily get confused.

https://wiki.archlinux.org/index.php/Color_Bash_Prompt
 
Old 07-31-2015, 04:28 PM   #3
robgeek
Member
 
Registered: Oct 2013
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
You can find many guides on how to customize the prompt.

There are actually 4 different prompts i.e PS1-PS4. PS2 is the secondary prompt which already uses ">" as default. If not changed will be white so technically you could tell the difference but if not paying attention you could easily get confused.

https://wiki.archlinux.org/index.php/Color_Bash_Prompt
Thank you very much!
What i did was create a "/root/.bashrc" with the following content:
Code:
PS1="\[$(tput setaf 4)\]> \[$(tput sgr0)\]"
And in "~/.bashrc" i changed the content to this:
Code:
#PS1='[\u@\h \W]\$ '
PS1="> "
Now, is working fine!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Terminator for Slackware Ztcoracat Slackware 19 06-30-2015 06:31 PM
terminator cygwin casperdaghost Linux - Newbie 1 11-23-2011 10:19 AM
No cursor in Terminator szboardstretcher Linux - Software 1 06-23-2011 12:04 PM
LXer: Try The New Terminator 0.90 (Alpha 1) LXer Syndicated Linux News 0 01-20-2010 04:20 AM
asus terminator + RH9.0 jimsee Linux - Hardware 0 05-23-2003 02:01 PM


All times are GMT -5. The time now is 11:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration