0

My Arch based system directly boots to tty and i never use x system or gui. I want to change prompt or whatever which looks like [root@0 ~]#. I want to change it to current time 12 hours format and no am pm or second. It means [hh:mm]. And if it is in red then it would be fantastic.

I tried some guides and changed it to [hh:mm:ss] by PS1="/@" but it goes away when i reboot.

0

Include the line PS1="/@" in /root/.bashrc. This is the shell configuration file for the root user.

Please note that it is unwise to log in as root. You should have good reasons if you are not following the points from the post installation guide, AKA General Recommendations.

| improve this answer | |
  • I tried that thing, i was not having that (. bashrc) file already but I created one using vim editor. And added just PS1="/@". That's all but unfortunately it failed. – Nirav Tailor May 7 '16 at 19:41
  • /root/.profile would be a better choice. – James Youngman May 8 '16 at 9:28
0

Hey everyone I got solution luckyly by bit roaming in file manager. I got file namely bash.bashrc in /etc. I viewed and found PS1 so I edited that with "/@" and it changed to current time.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.