How to make `sudo su` run startup scripts? Supposedly the bin/sh shell that is the default root shell is not strictly a "bash" shell, but is a POSIX compliant equivalent.  According to this site, when you invoke the shell executable of a "POSIX compliant" shell, it runs any of the "profile files" listed here: 

$HOME/.bash_profile
$HOME/.bash_login
$HOME/profile.ksh       ($HOME/.profile on UNIX systems)
$HOME/.profile


I've tried putting them all in /var/root and none of them execute when I run sudo su from my terminal.

Running sudo bash works, by the way.  But why doesn't sudo su?
Your information is incorrect. /bin/sh on macOS is actually a real bash shell. The manual you have found is for a Windows program that "mimics" a Linux environment on Windows. It doesn't have anything to do with macOS.

The profile files for bash are:


/etc/profile
~/.bash_profile
~/.bash_login
~/.profile


Note that ~ and $HOME are the same thing. They both mean that it refers to the user's home folder.

The problem you're seeing is because you're using the command sudo su. This means that you use sudo to start su in order to get an interactive non-login shell. This means that the profile files are not executed - instead only .bashrc is executed.

What you want is really a login shell, which would mean that the profile files are executed. You can do that by using the command sudo su - instead.