How to Stop Lightroom from Opening Automatically

To stop lightroom from opening automatically, go to Preferences,
Go to preferences

Uncheck Show Import dialog when memory detected box. This will stop lightbox from opening automatically.
Uncheck the Show Import dialog so that lightroom will not turn on upon plugging a camera in