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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-03-2003, 11:18 PM
|
#1
|
Member
Registered: Feb 2003
Location: Bangalore, India
Distribution: Fedora Core 2
Posts: 60
Rep:
|
time as shell prompt
How to find out time in the terminal.
Is it possible to have time as shell prompt.
Or is it possible to display time in any other part of the screen continuously in the terminal.
|
|
|
07-03-2003, 11:52 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141
Rep:
|
Put something similar to this in your .bashrc file.
Code:
# Change bash prompt. See the article
# http://www-106.ibm.com/developerwork.../l-tip-prompt/
export PS1='\d \@ \[\e[32;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[32;1m\] $ \[\e[0m\]'
# For the root account use this
# export PS1='\d \@ \[\e[31;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[31;1m\] # \[\e[0m\]'
Here is my current prompt
Code:
Thu Jul 3 11:52pm phil@tinwhistle ~ $
Last edited by fancypiper; 07-03-2003 at 11:54 PM.
|
|
|
07-04-2003, 12:45 AM
|
#3
|
Member
Registered: Mar 2003
Posts: 76
Rep:
|
hey damn nice link
|
|
|
07-04-2003, 02:05 AM
|
#4
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
Realize that the time in the prompt is static, so if you want the current time, you have to reactivate the prompt (hit ENTER).
|
|
|
All times are GMT -5. The time now is 08:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|