My current understanding is that commands added to these two files are run every time a new terminal is open. Is that correct? Because in a lot of places I see suggestions to put there commands I want to be executed at login, but if they get executed every time I open a new terminal, then I do not want that. Can you help me understand how they work? Also what is the difference between them?
If I understand them correctly, then where can I put commands that I want to be executed only on login, but not every time a new terminal is opened? I know that I can do that from the GUI for "startup applications", but I am interested in doing this in a file, if possible.
crontab -e
and add@reboot your_command or /path/to/script.sh
– Ivan Temchenko Feb 28 '16 at 15:57man bash
and skim to "Invocation". – Rinzwind Feb 28 '16 at 17:39