How to autorun commands on OSX when login remotely?
Is there a file, which is executed automatically when you ssh on iMac, like .bashrc on linux?
I tried .bashrc, .login, /etc/profile, nothing works.
How to autorun commands on OSX when login remotely?
Is there a file, which is executed automatically when you ssh on iMac, like .bashrc on linux?
I tried .bashrc, .login, /etc/profile, nothing works.
Copyright © 2021 Jogjafile Inc.
Because you're using a login shell the
.bashrcfile is not sourced. In this case the rules for bash are quite clear:Also note that: When an interactive shell that is not a login shell is started, bash reads and executes commands from
~/.bashrc, if that file exists. This may be inhibited by using the--norcoption.