How about the home dir of root that is /root/?
From some aspects, root is just another user (just better, and allowed more).
root has a home dir, but it is not like the other users in /home/,
but simply /root/ so root:s .bashrc is therefore /root/.bashrc
The ones in /etc is system specific settings for all users, including root.
Thanks to grawity to point out that you can use ~root points to the root home dir,
regardless of where it is.
You can test that with
$> echo ~root
/root
So even thou /root will work on 99% on the systems out there ~root is probably more portable and will probably work on 100%.
~root/.bashrc
skeldirectory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a~/.bashrc? – mbb Apr 10 '11 at 19:30useraddtool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template. – Keith Apr 11 '11 at 03:57~in~/.bashrcabove points to theHOMEof root which typically is set to/rootafter we logged in as root (sudo su). When logged in as root, use~someuserto point to the home ofsomeuser(/home/someuser). – M Imam Pratama Oct 31 '21 at 11:41