When i turn on my raspberry pi in command line mode it opens up with bashrc each time i startup my pi.If i open my terminal the same bashrc script opens first.Can anyone give me a solution. Thanks in advance
I'm guessing you've been misled by tutorials or blogs which imply or explicitly state that
.bashrc can be used for things you want to happen at boot.1 This is essentially false, although it has side effects that might make it seem that otherwise.
.bashrc is a shell initialization file. There are a few different flavours of these, which you can read about in
man bash under INVOCATION. For example:
When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.
You can think of an interactive shell as the command line. "An interactive shell that is not a login shell" applies to almost any shell that opens in a terminal, amongst other things. The "that is not a login shell" is often negated by the fact that
~/.bash_profile, which are initialization files called when starting an interactive shell that is a login shell, source
~/.bashrc. When this is the case,
.bashrc is run when starting any interactive shell.
Booting the system and starting an interactive shell are very different events, so if you put something in
.bashrc and expect it to run at boot, or to only run at boot, expect to be surprised.
- Authors of which should be banned from posting anything about how to use computers on the internet.
Undo the modification you have done.
Bashrc is a simple file name and has no special meaning but the bash shell (that what makes the command line) uses a configuration file
$HOME/.bashrc. Notice the dot at the beginning of the filename. It makes the configuration file invisible. You can show it with
ls -a. Check if you have the