How to add a script to /etc/profile.d so the script runs on every login?
Matthew Harrington
I need to make a script that on every login creates folder and subfolder, I have the script written but I don't know how to add it to /etc/profile.d
I have tried to write in /etc/profile.d source /home/user1/script1.sh but don't know if this is correct.
1 Answer
Just drop the script in /etc/profile.d/. You can use mv: sudo mv ~/script.sh /etc/profile.d/
** Make sure the file ends with .sh
3