Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Empowering you to understand your world

Stop A Program From Running On Startup (Command Line On Ubuntu)

You can stop a program from running on startup in Ubuntu (this is confirmed to work on Ubuntu 18.04) by using the ‘systemctl disable‘ command, following by the name of the service you would like to disable. You may need to run that commands with sudo.

NB: Stopping certain programs from running on startup may affect the stability of your PC or cause malfunctions. Please be cautious and proceed at your own risk.

Two common examples are:

Stop MongoDB from running on startup:

sudo systemctl disable mongodb

To stop PostgreSQL from running when Ubuntu starts:

sudo systemctl disable postgresql

Stopping programs from running on startup can reduce your computer’s startup time considerably and improve overall performance by eliminating the unnecessary memory usage of those programs. Many programs occupy RAM even if they aren’t in use.

This method may also work on other Linux distributions that use ‘systemd’. While the above method will stop services from running when Ubuntu starts up, other programs may be scheduled to run via cron jobs or ‘rc.local’, especially if they are binaries that were installed via other means.

If the command above doesn’t work, use crontab to check if there is a cron job starting that program up. That would be denoted by a line that starts with ‘@reboot’.

crontab -e

After running this command, select your preferred console text editor (Nano is straightforward) and look for something like ‘@reboot program_name’.

Leave a Reply

Subscribe to our newsletter
Get notified when new content is published