I am doing work on a remote computer using Secure Shell. I would like to add aliases to the ~/.bashrc file, but only if this edit applies to my user only. So the question, as the title states, is whether the ~/.bashrc file is user specific when I am connected to a remote system using Secure Shell (SSH)?
Is the ~/.bashrc file user specific when I am connected to a remote system using Secure Shell (SSH)?
1 Answer
As the name implies, ~/.bashrc
file is located within ~
directory, that is, user's home directory on the remote machine (~
is a shortcut used for user's home directory and usually is equal to /home/username
). So every user has their own separate ~
directory and their own .bashrc
file located in that directory. Of course this applies to users on the remote machine. When you login via ssh to the remote machine, the remote machine's OS does not distinguish between local users (ie. users on the machine you are connecting from). All that matters is user on the remote machine.
~/.bashrc
, from the very pathname, is located in your home folder, so it's user-specific). Local user, no..bashrc
file and it executes when that user logs in.