Your startup process may take too long if many services and applications load automatically every time you turn on your computer. Fortunately, Ubuntu makes it easy for us to manage startup apps and disable anything we deem unnecessary to load automatically. Let’s see how.
The two startups
The boot process of most Linux distributions is divided into two distinct parts.
The first part starts when the Linux kernel loads and lasts until we reach the login screen. A startup service – usually systemd – loads all of the services needed for basic functionality. These can include a Bluetooth stack, the audio subsystem, etc.
The second part starts when you log in and consists of desktop apps, usually like Slack or Skype.
Both are easy to control, but, as we will see, we will need to use different tools for each job.
Most modern Linux distributions, including Ubuntu, rely on systemd to automatically start all the necessary services. Systemd comes with some useful tools that can help us verify this initial startup process. We can use them to see the impact of anything that loads automatically and turn off anything that we consider unnecessary.
To check how long it took for systemd to load everything, type
systemd-analyze in the terminal and press Enter.
Systemd-analyzer will check the systemd logs and show you how long it took for your computer’s boot sequence to complete. Good to know, but not useful. If your boot sequence is slow, there must be something that is taking too long to load, something to blame. This is precisely what systemd-analysis allows you to do: find who is to blame. Try it with:
This will display a list of everything that systemd has loaded, starting with the most impactful entry and gradually progressing to the lightest.
Advice: If you have a long list of entries, you can export the list to a text file with the command:
It is easier to parse the text file than the terminal inputs.
Why is a print service running if you don’t even have a printer? If you find some services unnecessary, you can easily turn them off. Just use:
However, you need to be sure that they are unnecessary and that you will never need them. That’s why it’s worth checking out what depends on it with:
Manage your starter apps
The second part of the startup process relies on the desktop environment itself. Depending on your distribution and your desktop environment, you can use different tools to control it. On Ubuntu, you can find this tool by visiting your app menu and typing
startup. Select the Startup Applications entry that will appear.
The Startup Apps Preferences window will appear, showing you all of the apps that load automatically after you sign in.
To turn off the automatic loading of an app but keep its entry in case you want to re-enable it later, uncheck the box to its left.
To completely remove an entry, click on it to select it and then click Remove on the right.
If some entries are not critical for your desktop use, you can delay loading them so that the rest of the apps load faster. To do this, you need to edit their entries and add an additional command before the one that launches them, manually entering a delay. You can do it as follows:
sleep 60; The command will add a 60 second delay to the startup application.
Add an app to the startup list
This is also the place from which you can add your own applications to the boot sequence. You can do this by clicking the Add button on the right.
Enter whatever name you want for the startup item in the “Name” field and type your command in the aptly named “Command” field. You can also click on the “Browse…” button to the right of the field and select an executable file from the pop-up file dialog box.
Finally, if desired, enter a comment and click “Add” to add the command to the startup list.
Now that you’ve cleaned up the Startup Apps list, you might want to have it automatically empty the Trash to free up storage space or hide the top bar to free up screen space.
Is this article useful?