I just realized that you can run a command at login by appending it to your .bashrc
For instance, I added a curl pointing to a certain address that immediately upon login returns a message that tells me whether I’m connected to my VPN provider or not.
Sorry for the beginner revelation. Just thought it was cool. :3


https://www.reddit.com/r/linux/comments/1p6orz/bashrc_bash_profile_inputrc_profile_xprofile/
Generally, all POSIX compatible shells understand ENV as a entry-point. Bash also, but only in POSIX-mode (if called as /bin/sh or with the cli option), zsh, csh, fish do not.
OK this is hot
so much persistence mechanisms i can add my malware to!
Clear as day. Best summary ever.
The great thing about fish is that it doesn’t have this crazy tree.
I use zsh… It’s still complex enough to be an issue. I suspect that bash’s complexity might make it simpler for common use-cases without having to understand it.
Help explain this to me. I was under the impression that non-interactive shells are what happens when you execute a bash script, right? When I ssh into the head node of a compute cluster at work (so non-login, I assume) and run a script, why don’t my aliases get recognized and only accepts $BASH_ENV? According to this chart, they should get recognized
Not that simple sadly I’m going to have to RTFM you…
deleted by creator
So, basically bash is unable to determine that it’s running in a remote shell, so it behaves as if it’s a local shell?