Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How to add a script to /etc/profile.d so the script runs on every login?

Writer 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

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy