0

This question already has an answer here:

I checked by ls -al in my home directory but I don't see .bashrc file in my home directory. Ubuntu 18.04 release notes does not mention anything about this. I installed it without formatting previous /home partition after deleting files like .bash_, .local, .gnome, etc. I am able to use the pc like normal but where is the bashrc file now? Isn't it supposed to be recreated automatically?

marked as duplicate by N0rbert, Community Apr 28 '18 at 20:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • On my clean install of Ubuntu 18.04 LTS ~/.bashrc is in place. On both Ubuntu Desktop (GNOME) and MATE. You did something wrong. – N0rbert Apr 28 '18 at 20:20
  • I think I have mentioned it is not a clean install on purpose. Please ask for clarification before downvoting – sziraqui Apr 28 '18 at 20:38
5

Isn't it supposed to be recreated automatically?

No. A default .bashrc file is copied from /etc/skel when a user account is first created by adduser - if you retained your previous user account(s) then there would be no reason for it to be re-created.

You can copy it manually from /etc/skel yourself.

See man adduser.

  • Oh! I created a new user with exact same username as previous install to preserve all data. – sziraqui Apr 28 '18 at 20:20
  • 1
    @sziraqui but you re-used the home directory, yes? – steeldriver Apr 28 '18 at 20:23
  • Yes. I purposely created separate root and home partitions when I first installed 17.10 a year ago as I planned to switch to 18.04 LTS. I keep all my development tools (around 64 gb right now) in home partition to prevent re-setup on critical upgrades. I expected GUI will run adduser while installation (it did) but providing identical username seems to have caused problem. – sziraqui Apr 28 '18 at 20:37

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