i tried saving aliases (see below) for the root user in .bash_profile
to /var/root/.bash_profile and restarting Terminal, but it didn't work. where does the .bash_profile
file need to be to maintain persistent aliases in the terminal?
$ cat /var/root/.bash_profile
alias grep='grep --color=always'
alias net='sudo netstat -ap tcp && sudo lsof -Pn -i4'
my specifications:
sh-3.2# system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: OS X 10.8.5 (12F45)
Kernel Version: Darwin 12.5.0
Boot Volume: lily
Boot Mode: Normal
Computer Name: lily’s MacBook Air
User Name: System Administrator (root)
Secure Virtual Memory: Enabled
Time since boot: 12:37
.bashrc
in the/var/root/
directory? i just noticed theres no bashrc – lily May 7 '18 at 7:54$ sudo su
to get root, the aliases arent available anymore – lily May 7 '18 at 8:08.profile
(not .bash_profile) with$ sudo -i
works! if you put it in an answer ill gladly accept it – lily May 7 '18 at 8:19