How Do I Run a Linux Script After Login?
Contents

How do I make a script run automatically in Linux?

Executing Linux Scripts on Startup

  1. Launch Startup Applications. On the ‘Startup Applications’ main window, you will see three options on the right; Add, Remove, and Edit. …
  2. Add a startup program. A pop-window will open. …
  3. Update System. …
  4. Select Editor. …
  5. Reboot Cron Job. …
  6. rc.local file. …
  7. Systemd file. …
  8. Systemd File.

What scripts are setup to run when user logs in?

In Ubuntu, any script ending in . sh that’s placed in /etc/profile. d/ will be run whenever a user logs in.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest