- Create a script file, e.g. named
my_file.sh, in the
#!/bin/bashas the first line.
- Write whatever command(s) you want to be executed immediately after logging in, e.g.
- Mark your file as executable:
chmod +x /etc/profile.d/my_file.sh
*It should get executed after login. In case it doesn’t or you don’t have the ability to use root privileges, creating the same file under
~/.config/autostart should work fine (I haven’t tried this directory before).