In an online video lecture the teacher has explained how to add to PATH
both on the command line and via .bashrc
, and has indicated that the proper way of doing this is through .bashrc
but has not adequately explained why.
My question is what is the difference between executing the following from the command line:
$ export PATH=/home/username/bin:$PATH
Or simply adding the line: export PATH=/home/username/bin:$PATH
to my ~/.bashrc
.