I'm in /var/log directory, so should i type: cd root, then . / bashrc or directly type bashrc?
No, because that's not what I typed in my post at all.
What I posted was:
There are two distinct words in that command, separated by a space.
The first word is . (aka the source command) then a space and then the final part ~/.bashrc is the path to the .bashrc in the current users home directory. The ~/ part is literally a shortcut for /home/yourusername/
So ~/.bashrc would expand to home/yourusername/.bashrc
The entire line is equivalent to:
Code:
source /home/yourusername/.bashrc
Which involves a little more typing. And I'm lazy, so I use shortcuts wherever possible!
And the paths used are absolute, so it doesn't matter where you are in the filesystem.
You could issue the commands in my previous post from anywhere. All it does is reloads the specified config file.
And it's exactly the same with the .profile file!
Does that make sense now?