I perform clean Linux installs regularly. On my own computers and those of others. For my personal use and for review purposes. Over the years I have built up some standard habits that make both the installation and post-installation activities easily repeatable. For this goal, I have made standard checklists that I can go through again and again. For desktops, this checklist is slightly different than for laptops. In this article, I will share the 14 things I always do when setting up Linux on a laptop.
Content of this article
- Change to nearby update servers
- Update your operating system
- Install ubuntu-restricted-extras
- Set up Timeshift for backup and recovery of your system files
- Improve the use of internal memory
- Improve battery life with TLP
- Show battery percentage
- Optimize screen real estate with fractional scaling
- Dark mode for battery saving
- Disable Bluetooth
- Speed up application launch times with Preload
- Install Stacer to optimize and monitor your system
- Set up trackpad behavior
- Set up the perfect file finder Albert
Some things are extra important for laptops, like battery life, improving user interaction, and optimizing your screen real estate. Others are equally important for desktops and laptops. In this article, I will share the first 14 things I always do to set up a Linux laptop, so hopefully, they can be of value to you as well. So let’s start.
1) Change to nearby update servers
In the standard installation of most Ubuntu-based distributions, the Main and Base mirrors, which are the sources for retrieving your software updates, are probably not the closest to your physical location and probably not the fastest option for your specific situation. To change to a more nearby update server to improve update performance you can do the following:
GNOME based systems (Ubuntu, Zorin OS, etc)
1) Click on the Zorin icon on the left of your panel in the lower part of your desktop to open the applications menu or applications grid (this depends on your theming).
2) Search for “Updates” and click on the icon with the name “Software & Updates”.
3) Select the tab “Zorin Software”.
4) Click on the dropdown next to “Download from”.
5) Select the option “Other…”.
6) In the “Choose a Download Server” screen first choose your (nearest) country and within that option choose a server.
7) Now click on “Choose Server” and enter your password when asked for.
8) You can now close the (Software & Updates” screen.
The following message will be presented to you.
As you change to another server, you have to reload the information about available software.
9) Click on “Reload”.
The cache will be updated. After the update process, this screen will close automatically. Based on your changes you will probably notice an improvement in the update-performance of your system as you get your data from a source more nearby your location.
Linux Mint Cinnamon
1) Click on the shield icon in the right bottom corner to open the Update Manager.
2) First determine if Update Manager notifies you of available updates. If so, make sure they will all be installed. It is possible that you will be notified more than once. Install them all.
3) It can be that Update Manager already asks you if you want to switch to a local mirror as shown below. To show you how to change to nearby update servers yourself, we click here on No.
4) Find the “Edit” menu option in Update Manager and click on it.
5) Click on “Software Sources” and select “Official Repositories”.
6) Find Main in the Mirrors section and click on the value in it.
7) Based on speed analysis it automatically tries to find the mirrors closest to you. In my case, it finds Dutch mirrors. If you prefer another mirror you can scroll through the list and select the one you like. Click Apply.
8) In the bottom part of the Software Sources screen you will see a message that your configuration has changed and that you need to click on OK to update your APT cache. Click on OK to update the cache.
9) Now click on the value for Base in the Mirrors section and repeat steps 7 and 8 above.
Now both the Main and Base mirrors are changed to the mirrors close to you.
2) Update your operating system
After we changed, in the previous step, to a nearby server for optimal update download, we should update our package index files and upgrade to install the newest versions of all packages to start from the most up-to-date foundation. Then we are sure we install the most recent components. An update should always be performed before an upgrade.
1) Open a terminal session with Ctrl + Alt + T keyboard combination.
2) Type the following command and give enter to update the package files:
sudo apt-get update
3) Type the following command and give enter to install the latest versions of all packages currently installed on your system:
sudo apt-get upgrade
You will get the message “Do you want to continue? [Y/n]”.
4) Type “Y” and give enter (or just hit Enter, because the capital Y indicates this is preselected).
Your system will now be updated.
3) Install ubuntu-restricted-extras
Due to certain legal and copyright restrictions, Linux distributions cannot provide for example some important media codecs out-of-the-box. Without these codecs, you can’t for example play different types of local media files and online media. But you can install the required software yourself by going through the following steps:
1) Open the Terminal with the keyboard combination Ctrl + Alt + T.
2) Type the following command:
sudo apt install ubuntu-restricted-extras
With this command, you installed a software package from which you enable support for unencrypted DVD playback, Microsoft TrueType core fonts, Adobe Flash plugin, and codecs for important audio and video files like MP3 and H.264.
Note: using the above command to install these extras, does not mean that you are enabling illegal software. It is set up like this to better follow the law. For more information, visit https://en.wikipedia.org/wiki/Ubuntu-restricted-extras.
4) Set up Timeshift for backup and recovery of your system files
The question is not if your storage device will break down, but when it will actually happen. Every storage device like a hard drive or SSD device has a limited lifespan and the moment it stops working is always at an unexpected and undesirable moment. But the risks are not only about crashes, as it also involves data loss due to flooding, fire, and lightning strikes, but also as a result of just wrong human actions and decisions. So we need to be aware of those situations and act on them by setting up a good backup implementation for your system files.
Although a lot of Linux distributions include a backup utility, in my opinion, the application Timeshift is superb for the backup and restore of your system files. Timeshift is not meant for every backup situation. To secure and restore your individual personal files, such as text documents, spreadsheets, photos, and films, which are maybe even stored on separate drives, it is advisable to use another backup application such as LuckyBackup or Cronopete. But for securing your system implementation including your home folder, Timeshift is a perfect solution, as it enables you to recover your whole system when something really went wrong.
Timeshift works on the basis of incremental backups. The first time, when there is nothing backed up yet, Timeshift will have to make a full initial backup of course, but from then on Timeshift only looks at the modified files and then only makes a backup of those changes. The advantage of this is that these backups are much faster since the number of files that are in scope is much smaller. But also the amount of storage needed is much smaller.
To read more on setting up Timeshift, see my article “How to use Timeshift to backup and restore Linux Mint”, my article “How to setup and use backups in Linux Mint“, and my article “How to setup and use backups in Zorin OS“.
Read my article “How I set up my data and backup strategy as a Linux user” for more information on my data and backup strategies.
5) Improve the use of internal memory
Linux distributions like Zorin OS are configured in such a way that if your memory usage reaches a certain percentage of the internal memory in your machine, it is starting to use the swap. The swap is a technique to use a special swap partition or swap file as additional working memory. But using swap is much slower than your internal memory so it should be used only when really required. The default value is 60 which means that the swap comes into operation when 40% of the RAM is in use. This standard turning point of 60 is in my opinion a bit early, especially if you have only 2 or 4 GB of internal memory. My advice is to bring this value down to 10, which means that the swap comes into operation when 90% of the RAM is in use. This can be adjusted by defining the swappiness in the sysctl.conf.
You can read exactly what to do to change the swappiness to a lower value in my article “How to use your internal memory optimally in Linux“ , but in short, do the following:
1) Open a terminal session with the keyboard combination Ctrl + Alt + T.
2) Type the below command and give enter.
Now you see the current value for the swappiness, which is in my case 60.
3) If you are using a GNOME based distro like Ubuntu and Zorin OS, type in your terminal the below command and give enter (mind the space between gedit and /etc).
sudo gedit /etc/sysctl.conf
Note: While GNOME has the “gedit” editor, for other distros you need to use below:
- Linux Mint Cinnamon, use “xed”.
- Linux Mint MATE, use “pluma”.
- KDE, use “kate”.
An editor will be opened with elevated privileges. Here we can edit the sysctl.conf file.
4) Go to the last line in the file and give enter to start a new empty line.
5) Type the below:
6) save the file and close the file.
7) Reboot your computer.
When the computer is up and running again you can check the new configuration.
8) Open a terminal session with the keyboard combination Ctrl + Alt + T.
9) Type the below command and give enter.
Now you can see that the swappiness value is indeed 10 now, which means that your system will use up to 90% of your internal memory before switching over to a swap file. This should keep your system more responsive when using heavier workload.
6) Improve battery life with TLP
The Linux operating system is really great since it is stable, robust, modern, and user-friendly, and therefore it can easily compete with the established operating systems and even surpass them at some points. But Linux is not equally strong at all points. One of the areas that deserve more attention is battery life when running on a laptop. Most Linux distributions are out of the box not really optimized to get the most out of your laptop. On a desktop, you don’t need to improve battery life of course, but on your laptop, you should give some attention to optimizing your power consumption, so you can use your machine as long as possible during the day. Up till this very moment it has never been possible to squeeze as many hours out of a Linux-based laptop as compared to Windows- and especially macOS-based machines. But things can be improved with an application like TLP.
TLP is a very extensive software solution, but the nice thing is that it offers out-of-the-box a configuration already optimized for most laptops. But on top of that default setting, there is a lot to adapt to fulfill your specific needs. TLP gives you all the required functions to tweak your components like the processor, hard disks, wireless components, network devices, and graphics and sound devices. Think about processor frequency scaling, power-aware process scheduler for multi-core and hyper-threading, wifi power saving mode, hard drive advanced power management, audio power saving, and Input/Output schedulers.
1) Start a terminal session via the keyboard combination Ctrl + Alt + T.
2) Add the TLP Package Repository to your package sources with the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
3) Install the packages tlp, tlp-rdw, tp-smapi-dkms and acpi-call-dkms via the following command:
sudo apt-get install tlp tlp-rdw
ThinkPad laptops require an additional command:
sudo apt-get install tp-smapi-dkms acpi-call-dkms
This was just a minimal description of the installation process. If you want more details of everything TLP has to offer, how to install the graphical interface TLPUI and how to set up these applications, please have a look at my article “How to improve battery life on Linux laptops with TLP” or visit the TLP website.
7) Show battery percentage
In most Linux distros the status icon in the system tray shows the charge level of the main internal battery, and whether it is currently charging or not. But with a simple change, it can also display the charge as a percentage, which is much more valuable for a laptop user.
GNOME based systems (Ubuntu, Zorin OS, etc)
1) In your Linux distribution, go to your Settings.
2) Now find the Power section.
3) In the Suspend & Power Button section enable Show Battery percentage.
Linux Mint based systems
1) Right-click on the battery icon in the panel.
2) Click on “Configure…”.
3) In the pop-up screen click on Display and choose between Show percentage, Show time remaining, or Show percentage and time remaining.
8) Optimize screen real estate with fractional scaling
With the high-resolution screens on modern laptops, you can have a very nice and sharp user interface. But the problem can be that after installing your Linux distribution, everything looks too small to be usable for some of us. The out-of-the-box experience was intended for larger desktop screens, but current laptops with HiDPI screens, due to high resolutions in a relatively small format, will make components like text and icons, too small. The solution is fractional scaling.
In your Linux distro go to Settings. From there search for Displays. Here you will see a Scale section, with standard values like 100%, 200%, etc. But it also has the option Fractional Scaling. When you enable this option you will get additional scaling options, like 125%, 150%, 175%, etc.
For a lot of people, the standard 100% scaling on a 13-inch 1920 x 1080 is not comfortable to read and use, but 125% is. of course, everyone has their own preferences, so try this option yourself until you find the right scaling for you.
9) Dark mode for battery saving
This tip is simple. There is a noticeable difference in power consumption between light mode and dark mode. With dark mode, the pixels on your screen don’t need to light up as brightly as in light mode. So, next to the fact that dark mode is better for your eyes in general, I always switch to dark mode when working on my laptop to improve battery life.
10) Disable Bluetooth
We don’t need Bluetooth in every situation. I myself do not use any Bluetooth devices such as an external keyboard or mouse when I work with my laptop. But Bluetooth consumes available power from your laptop battery, even if you’re not actively using it. In that case, always check whether Bluetooth is switched off in the settings.
1) Go to your Settings.
2) Find the Bluetooth section.
3) Disable Bluetooth.
11) Speed up application launch times with Preload
You probably have seen that some applications start slower than others. There are many reasons for this behavior, like the size of the application and the package type. If you want to have a faster start-up time for your favorite apps it can be wise to start these apps from memory and not from disk. Of course, every application must start initially from disk, but what if you can preload these applications before you actually choose to start them? When already in memory you will see a significant speed bump when starting your apps. To do this you can install the application Preload.
Preload is what they call in technical terms a daemon. This daemon is active in the background of all your processes. Preload is a nifty application that becomes better after a while because it monitors what apps you use most. Based on that behavior it expects that you will use these apps also more than others in the future. Based on that it chooses to bring some apps already into memory for you. This should have a noticeable improvement for start-up time.
Installation of Preload is simple. Open your Terminal with the keyboard combination Ctrl + Alt + T and type or copy the below command into it:
sudo apt-get install preload
Now power off your system and start it up again. From now on Preload runs in the background monitoring your application behavior. It sounds more creepy than it actually is because this behavior is not shared with parties that shouldn’t have your data. It just tries to find out which applications are used more frequently than others, so it can decide if they will be preloaded for you.
12) Install Stacer to optimize and monitor your system
Making clutter is easier than cleaning up clutter. Making a mess happens naturally to many people, but cleaning up the mess requires a bit of discipline. And this works better for one person than for another, so if there is some help out there that makes the job easier, that would be a great gift for a lot of us. Due to the fact that I try out many applications and settings as a basis for writing my blogs, the chance of digital contamination of my Linux system is very high. At a certain moment, you no longer know what you have and have not installed and whether you have removed everything you no longer need correctly and completely. In addition, I also have a need to see how my system is performing after a period of intensive use. One of the applications for Linux that people like you and I can use in this process is Stacer. In my opinion, Stacer is the most user-friendly system optimizing and monitoring tool for Linux and fits in the user-oriented Zorin OS distribution.
Stacer is an application heavily based on a graphical user interface with the aim of offering an extensive set of both cleaning and system monitoring functionalities for the Linux user. By using an accessible and beautiful user interface, Stacer wants to make the process of cleaning and monitoring easier for the average user. But also the experienced user can easily make it part of a Linux-based workflow.
Over time, after the initial installation of your Linux operating system, you build up lots of files without sometimes knowing what their actual goal is of being there and some of them are even not visible without actually looking for them. With Stacer, you can find these files easily, and helps you out in safely removing them. Stacer is also a tool that helps you to monitor your system processes in a graphical way and offers means to manipulate different aspects of your system.
You can read my article “Stacer is the best system optimizing and monitoring tool for Linux” to learn more about the installation, setup, and usage of Stacer.
13) Set up trackpad behavior
When you work with a laptop, you probably also often use the built-in trackpad. For the trackpad, it is possible to change the scroll behavior. Some people like to push the content on the screen upwards, by an upward finger movement (called Natural Scrolling). Other people find it much more logical that a finger movement indicates the direction you want to go. I belong to that last group.
You can adjust the scroll direction via the Mouse & Touchpad section in your Settings.
14) Set up the perfect File finder Albert
Some years ago I completely switched from Apple’s macOS to Linux and since then I haven’t looked back. And although I am now a dedicated Linux user and enthusiast and write with passion about it on my website, it does not mean that I can no longer see and appreciate the qualities of Apple products, both hardware as well as software. One of these Apple solutions that I and many others with me can appreciate is Spotlight. But don’t worry, for Linux there are also comparable applications available, like Mutate, Krunner, GNOME Do, and Ulauncher. But personally, I think Albert is best, which has the same look and feel as Apple Spotlight.
Even though Albert cannot be fully compared with Spotlight, there are still many features that are similar and some even more polished that make Albert a great Spotlight alternative for Linux. With Albert you have a simple starting point or a quick launcher, that can be activated via a simple key combination, to find, access, or start all your own applications, files, and folders and their paths, but also finds bookmarks and helps you to browse the web in a focused way.
You can read more on Albert in my article “Albert is a good Spotlight alternative for Linux“.
As already mentioned, I really like checklists. They help me to think only once and then they are repeatable when necessary. The things as described in this article, to set up a Linux-based laptop, help me time and time again to easily set up my own and others’ laptops, right after the initial installation of a Linux distribution. I hope it also helps you to get off to a good start with your Linux-based laptop. Please let me know if you have other tips that you want to share to make a Linux laptop user’s life more simple.
Have a look at my latest book on Linux, in Paperback or Kindle format.
For more info on my book click here.
When you want to buy the book click on the image below.
If you appreciate what I do on this website…,