7

Will I be able to login? What havoc will it cause, if any? How will it mess up m terminal? There are login and non-login terminals too. How will it affect those?

2
  • Do you mean a local .bashrc in your home directory?
    – htorque
    May 17, 2011 at 11:32
  • Yes. but what if the /etc/bash.bashrc is non-existent? May 17, 2011 at 11:36

2 Answers 2

5

It is fine not to have a bashrc file (apparently you mean a personal ~/.bashrc file).

The effects of not having the default bashrc file can be examined by reading what the default .bashrc file changes in your shell environment. There is nothing critical in the .bashrc file; bash will simply use (conservative) defaults when it is being run (for example, no aliases, no completion, no color ls).

If the shell is not interactive, the default .bashrc file is not parsed (there is a command at the start that checks whether the shell is interactive; if not, it merely exits).

If the system-wide /etc/bash.bashrc is missing, it is still not critical to the system. The most important element from /etc/bash.bashrc is to enable the command-not-found feature; when you type a command that is not found, it gives suggestions as to what packages you can install to get the said command.

2
  • No, I was just curious, so as to what would happen in its absence. May 17, 2011 at 11:35
  • I updated the answer with references to what if /etc/bash.bashrc is missing.
    – user4124
    May 17, 2011 at 14:19
0

Try

man bash

and look at the INVOCATION section. That will explain how bash starts up.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .