Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

What is a .bashrc file and what does it do?

Writer Mia Lopez

I can't seem to find any clear information on what the .bashrc file is and what it does exactly.


Thanks for all the help so far. It seems that this script does everything from coloring, completion, aliases and shell history, etc. Is there anything that does not seem useful?

1

1 Answer

The .bashrc file is a script that is executed whenever a new terminal session is started in interactive mode. This is what happens when you open a new terminal window by pressing Ctrl+Alt+T, or just open a new terminal tab.

By contrast a terminal session in login mode will ask you for user name and password and execute the ~/.bash_profile script. This is what takes place, for instance, when you log on to a remote system through SSH.

The .bashrc file itself contains a series of configurations for the terminal session. This includes setting up or enabling: colouring, completion, the shell history, command aliases and more. The .bashrc file distributed with Ubuntu is well commented and you will be able to understand most of what it does just by reading it.

You can tweak .bashrc to your liking. Here you can get an example with many extra features.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy