I accidentally replaced my ~/.bash_profile with an empty file. My usually colored screen has turned black and white. (I'm running in command-line-mode with Raspbian Stretch Lite). How do I reset this file?

  • 1
    That file is not present by default on RPF Raspbian installs. Coloured prompt / listings etc is set in ~/.bashrc – Dirk Dec 7 '18 at 23:42
  • My pi@raspberrypi:~ $ used to be colored, now it's white... – Raymo111 Dec 7 '18 at 23:49
  • The only thing I touched was added that file. – Raymo111 Dec 7 '18 at 23:49
  • If you added that file, just add it again! – jake Dec 8 '18 at 2:09

Copy it from /etc/skel/.profile. You'll also find .bashrc in /etc/skel

  • Interesting. I will try this. – Raymo111 Dec 8 '18 at 0:37
  • 2
    This may replace .profile but the question was about /home/.bash_profile (sic) which doesn't exist (neither does ~/.bash_profile) – Milliways Dec 8 '18 at 1:46
  • @Milliways whoops! I just corrected my question. I was a Linux noob back then – Raymo111 May 4 '20 at 17:17

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.