Delete the .bashrc, .bash_profile, and .profile files: what are the consequences?

2

I've been trying to install Ruby and Ruby on Rails through RVM but during the installation process I had some problems. I tried to uninstall RVM through the commands:

rvm implode 

gem uninstall rvm

After performing these commands, I thought it was to delete the files .bashrc ; .bash_profile ; .profile so I did.

When I tried to reinstall RVM these files did not return. How do I proceed, since I have to configure the:

.bashrc :

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

.bash_profile :

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

PS: I'm starting in Ubuntu, so I followed these tips initially: link

    
asked by anonymous 27.02.2014 / 23:06

3 answers

4

These files are part of the system and serve to set a configuration for the terminal when you open it. The RVM changes them to include in the PATH and to be able to execute directly even being in your home.

There is a copy of their originals in the /etc/skel system directory, get them there!

    
27.02.2014 / 23:12
2

These files configure the environment with user preferences. A priori, deleting these files does not affect the operating system, but can cause common executable commands to not be recognized.

    
27.02.2014 / 23:10
0

If you are using graphical environment and therefore only virtual terminals with interactive shell , .bash_profile should not be missing. Just like .bashrc and .profile that are used to customize your environment (type env to see all variables set), set aliases and run some program you like when opening a new terminal (for example , mott or cowsay ), .bash_profile will only be executed when you use a login shell ( ssh or logging in TTYs - ALT + F1, ALT + F2, etc ...)

If you are actually using a login shell , copy .bashrc to .bash_profile .

$ cd ~
$ cp .bashrc .bash_profile

Or create a link:

$ cd ~
$ ln -s .bashrc .bash_profile
    
16.09.2014 / 20:34