Announcement

Collapse
No announcement yet.

Change Look of the console...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change Look of the console...

    Hi
    I was wondering if i was possible to change the look of the console.
    right now its : user@hostname directory $
    i want it to be:(user@hostname time directory)
    is it possible?
    if so, how would i do it?
    Thanks

    #2
    Re: Change Look of the console...

    sure.
    edit your .bashrc file.
    look for where the PS1 variable is set.
    you'll likely find this line:
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    change it so as to have it read like this:
    PS1='${debian_chroot:+($debian_chroot)}\u@\h \t \w\$ '
    thus, adding \t.

    here's the other time formats you can use on top of \t:
    \t the current time in 24-hour HH:MM:SS format
    \T the current time in 12-hour HH:MM:SS format
    \@ the current time in 12-hour am/pm format
    \A the current time in 24-hour HH:MM format
    you'll also find another line where PS1 is set.
    i'll let figure out whether you need/want to change that as well.

    hth

    ps:
    for changes to be effective you don't need to reboot.
    just open a new shell...
    gnu/linux is not windoze

    Comment


      #3
      Re: Change Look of the console...

      Thanks, but i just copied the profile from my old disro to ~/.bashrc.

      now it looks like this: (user@hostname)-(11:01 AM Fri Jun 15)-(directory)

      Comment

      Working...
      X