I’ve been using Ubuntu (mainly 12.04) for around three years, let’s say, since early 2013. The reason? Well, all the cool and useful tools for Robotics have been recently targeting this Linux distribution. What tools? ROS, OpenRAVE, Gazebo, PCL… Should I continue?
So, back them, early 2013, when I only knew about Linux from my freak friends and had used Windows my whole life. In order to make the change, I had to gather enough courage and jump into this new world. Nowadays, when I see people going through the same process, most of them struggle with the same things that I did.
If you ask me, any introduction to Ubuntu should start with the terminal (command line or console). And since there are many commands that you will need to run every time you start a new terminal, then, the introduction should start with the infamous .bashrc
file.
So, what is this file? I find the following answer very concrete and easy to understand:
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.