LinuxQuestions.org
Help answer threads with 0 replies.
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 06-05-2009, 01:38 AM   #1
sd9
Member
 
Registered: Apr 2009
Posts: 53

Rep: Reputation: 15
Coloured command prompt everytime I open the terminal?


Hi,

I like to have a coloured command prompt, and I know the command export PS1="\[$(tput setaf 2)\]\u@\h:\w $ \[$(tput sgr0)\]"

The trouble is that I have to type this command everytime I open a terminal.

Is there a way to enter this command into a file which executes automatically whenever I open a terminal?

I'm on Fedora 8
 
Old 06-05-2009, 01:46 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Add it to your .bashrc file in your login terminal.
The leading dot makes it a hidden file, but its there if you do

ls -a
 
  


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
LXer: Linux Gnome Hack: Open Terminal (shell prompt) in Current / Selected Directory LXer Syndicated Linux News 0 11-06-2008 09:20 AM
Terminal/command prompt has insane refresh rate, looking how to change it. Wolvenmoon Linux - Newbie 2 06-01-2006 08:12 PM
command line: coloured files,dirs,etc kpachopoulos Linux - General 3 11-13-2005 05:24 PM
Coloured folders/files in terminal? neocookie Linux - Software 1 05-23-2004 12:31 AM
FREE Coloured custom command prompts!!!!! =) Hegemon Linux - General 8 01-20-2003 05:34 PM


All times are GMT -5. The time now is 03:05 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