Announcement

Collapse
No announcement yet.

Essential and strongly recommended things to do directly after a Kubuntu 24.04 LTS installation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Essential and strongly recommended things to do directly after a Kubuntu 24.04 LTS installation

    • I always perform (and strongly recommend) the following 6 (7) steps directly after any Kubuntu (24.04) desktop installation - this usually takes under 5-10 minutes (including reboot):

    To do so --> open the Konsole terminal emulator from your --> Application Launcher --> System.
    Due to preventing typing errors​, please copy and paste the following commands one by one into Konsole - e.g. with your mouse or with "[Ctrl] [c]" and "[Ctrl] [Shift] [v]" - and execute them with [Return]. Double-check that you did not miss a letter or two.
    --> Everything in grey behind a single "⦁" is a whole command and has to be copied as a whole - even if it is longer than one line.

    1. Please correct a possible installation bug for ext4 file systems in the /etc/fstab file first
    ( = replace the "discard" option with "defaults", because a systemd timer for fstrim is already running) !

    To not do both is recommended by e.g. Red Hat and the ArchWiki (and openSUSE, Debian or Ubuntu's main distribution also do not do it) !
    Furthermore Red Hat and SUSE (openSUSE) also recommend in general to use a timer/fstrim instead of the "discard" option (and Fedora, Debian or Ubuntu's main distribution also use fstrim.timer instead) - except for special cases.
    If you are unlucky, using the "discard" option in /etc/fstab may decrease the SSD's lifetime and can lead to performance degradation. Also fstrim can behave unpredictably when the "discard" option is addionally set…

    In case you don't know whether you chose the ext4 file system during installation the chance you did is quite high as it is the default for Kubuntu 24.04 LTS.
    And if you didn't choose ext4 the following two commands won't do anything (except making a backup of your /etc/fstab file).
    If the bug has been corrected in the meantime, neither the following sed command a. nor b. will do anything at all either.
    • sudo cp /etc/fstab /etc/fstab.orig (this makes a backup of your /etc/fstab​ file first)
    • a. sudo sed -i '/ext4/ s/discard/defaults/' /etc/fstab (this replaces the wrong options with the right ones)
    I would even suggest to additionally use the "noatime" option, if you don't need the information about when you have accessed (= opened or read) a file or folder, because this makes using old HDDs a tiny little bit faster and reduces write actions - and therefore wear on SSDs.
    So instead of the last command (a.) then you can
    • b. alternatively sudo sed -i '/ext4/ s/discard/defaults,noatime/' /etc/fstab (this replaces the wrong options with the right ones)
    For safety reasons don't use the sed commands of step 1. in any other context than a fresh Kubuntu 24.04 LTS installation! Instead check and modify your /etc/fstab file by hand if need be - and back it up first.

    The change will be applied with the reboot after step 6. (7.)

    2. Reduce swappiness for desktop installations like it is suggested for *Ubuntu and like e.g. TUXEDO OS also does it
    ( = the system will use the physical memory modules longer and use the swap file or partition later).

    If you are curious you can check the setting with sudo sysctl vm.swappiness now and then again after step 6. (7.) and the reboot.
    • echo -e "# Reduce swappiness for desktop installation (default = 60)\nvm.swappiness=10" | sudo tee /etc/sysctl.d/99-sysswappiness.conf (this writes the modified value to your system)
    The change will be applied with the reboot after step 6. (7.)

    3. Reduce systemd timeouts for desktop installations like KDE suggests for Plasma in their Distributions/Packaging Recommendations
    ( = the system will not "hang" for 90 seconds and longer from time to time when logging out, rebooting or shutting down).

    I am reasonably conservative here and use 15 seconds, because on older machines it has seldom taken 10-13 seconds before certain services were able to gracefully quit by themselves (for example: KDE neon uses 15 seconds, TUXEDO OS and Garuda KDE use 10 seconds).
    • sudo mkdir -p /etc/systemd/system.conf.d && echo -e "# Reduce timeout (default = 90s)\n\n[Manager]\nDefaultTimeoutStopSec=15s" | sudo tee /etc/systemd/system.conf.d/99-systemtimeout.conf (this writes the first modified value to your system)
    • sudo mkdir -p /etc/systemd/user.conf.d && echo -e "# Reduce timeout (default = 90s)\n\n[Manager]\nDefaultTimeoutStopSec=15s" | sudo tee /etc/systemd/user.conf.d/99-usertimeout.conf (this writes the second modified value to your system)
    The change will be applied with the reboot after step 6. (7.)

    4.a) Change GRUB to show the boot menu for 1 second in single-boot systems
    ( = only Kubuntu is installed - this makes the boot menu much easier to access whenever you might need it).
    • sudo cp /etc/default/grub /etc/default/grub.orig (this makes a backup of your /etc/default/grub​ file first)​
    • sudo sed -i 's/^GRUB_TIMEOUT_STYLE=hidden/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub (this writes the first modified value to your system)
    • sudo sed -i 's/^GRUB_TIMEOUT=0/GRUB_TIMEOUT=1/' /etc/default/grub (this writes the second modified value to your system)
    • sudo update-grub (this updates your GRUB boot loader with the new values)
    OR

    4.b) Change GRUB to show the boot menu with all installed systems for 5 seconds in multi-boot systems
    ( = Kubuntu and another Linux or/and Windows are installed - and be sure to absolutely disable Windows fast startup if you intend to access the "C:" drive from Linux).
    • sudo cp /etc/default/grub /etc/default/grub.orig (this makes a backup of your /etc/default/grub​ file first)​​
    • sudo sed -i 's/^GRUB_TIMEOUT_STYLE=hidden/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub (this writes the first modified value to your system)
    • sudo sed -i 's/^GRUB_TIMEOUT=0/GRUB_TIMEOUT=5/' /etc/default/grub (this writes the second modified value to your system)
    • sudo sed -i 's/^#GRUB_DISABLE_OS_PROBER=false/GRUB_DISABLE_OS_PROBER=false/' /etc/default/grub (this writes the third modified value to your system)
    • sudo update-grub (this updates your GRUB boot loader with the new values)
    The change will be visible with the reboot after step 6. (7.)

    5. Update your system and your programs for the first time
    (this is generally one of the first things you should do after installing any operating system).​
    • sudo snap refresh && sudo systemctl daemon-reload (this updates the Snaps - not necessary if you chose the "Minimal Installation" option)
    • sudo apt update && sudo apt full-upgrade (this updates all of your installation except for the Snaps)
    • sudo apt autopurge && sudo apt autoclean (this removes possible remains of the installation process)
    In case this is not a fresh Kubuntu 24.04 LTS installation, be careful with the autopurge in step 5. and thoroughly read and understand the output in Konsole !

    6. Install fundamental missing software like
    • multimedia codecs etc.
    • Microsoft Web and replacement fonts
    • exFAT utilities (the file system you should use to e.g. share USB sticks between Linux, Windows and macOS).
    You can select with [Tab] and confirm with [Return] in the following dialogues, select "Ok" and "Yes" to install.
    • sudo apt update && sudo apt install kubuntu-restricted-extras gstreamer1.0-vaapi libvdpau-va-gl1 rar fonts-crosextra-carlito fonts-crosextra-caladea exfatprogs (this installs all of the listed above)


    7. If you have a CD, DVD or Blu-ray drive, install the following to be able to play back video CDs, DVDs or Blu-rays.

    You can select with [Tab] and confirm with [Return] in the following dialogues, select "Ok" and "Yes" to install.
    • sudo apt update && sudo apt install libdvd-pkg (this installs the video play back for optical media)
    • sudo dpkg-reconfigure libdvd-pkg (this activates the video play back for optical media)

    • reboot and enjoy Kubuntu 24.04 LTS !
    Now it is time to begin thinking about a backup strategy for your future user data, e.g. with Kup ( --> System Settings --> Backup) or with something more versatile like Back In Time (as in Kubuntu Focus) - or may it even only be regularly "by hand"…



    • Bonus - individual and potentially less important things to do:

    a. It is possible to remove Snap from Kubuntu 24.04 LTS and to use the "traditional" Firefox and Thunderbird additionally to or instead of the Snaps

    b. Enable Flatpak
    (e.g. to increase your pool of available programs).​

    c. Enable password feedback for the command line interface
    ( = so you can see something like ***** instead of nothing when typing in your password in Konsole - like you can see it in e.g. Linux Mint and Garuda KDE).
    • echo -e "# Enable password feedback\nDefaults pwfeedback" | sudo tee /etc/sudoers.d/pwfeedback (this writes the modified value to your system)
    • sudo chmod 0440 /etc/sudoers.d/pwfeedback (this applies the correct permissions to the written file)
    You will have to close Konsole and open it again to apply the change.

    d. Disable fast user switching
    (e.g. for security or performance reasons in multi-user setups).
    • echo -e "\n[KDE Action Restrictions] [\$i]\naction/switch_user=false\naction/start_new_session=false" | sudo tee -a /usr/share/kubuntu-default-settings/kf5-settings/kdeglobals (this writes the modified values to your system)
    You will have to log out and in again or reboot to apply the change.
    Last edited by Schwarzer Kater; May 16, 2024, 04:26 AM. Reason: modified explanation
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    #2
    In the past 24 hours I have changed a lot of small layout bits (to hopefully increase readability…) and added some more explanations to the post.

    I also hope it is now a little easier to understand for new-to-Linux users or users that never or rarely use the command line interface…

    Have fun with Kubuntu 24.04 LTS !
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    Comment


      #3
      Thank you very much for investing time to write this! It is really helpful for a non-IT user like me.

      I´d like to ask, why aren´t such choices available during installation? A non-IT use who does not know about this forum cannot experience Kubuntu the same way like someone who took the above steps. For example, someone wanting to use Flatpaks and Appimages, who doesn´t know of the above guide will need to search the web for quite a while until reaching here. Is it possible to include such options during installation? At least for 24.04.01?

      Thanks again for your time!

      Comment


        #4
        Originally posted by zahtar View Post
        Thank you very much for investing time to write this! It is really helpful for a non-IT user like me.

        I´d like to ask, why aren´t such choices available during installation? A non-IT use who does not know about this forum cannot experience Kubuntu the same way like someone who took the above steps. For example, someone wanting to use Flatpaks and Appimages, who doesn´t know of the above guide will need to search the web for quite a while until reaching here. Is it possible to include such options during installation? At least for 24.04.01?

        Thanks again for your time!
        Yes, Schwarzer Kater has done all of us a solid favor by coming up with all these updates, and ways to do things better.

        As to the question of why not include these during installation, that would be an additional 15 or so steps that one would HAVE to go through to install Kubuntu. In my opinion, that would be very impractical. Not all of us want to or need to do any, most, or even all of these things. They are good options to consider after a successful basic install.

        Some things, like the use of Snaps, have been made by Canonical (owner of the Ubuntu brand); so having a decision point about whether to do that or not would not be in their self-interest. I'm not a fan of Snaps, but I am a fan of Kubuntu, so the decision is easy - install Kubuntu then run S-K's scripts. By default, I'm not really interested in running Flatpaks or Appimages, with maybe a few exceptions that I haven't seen yet, and that decision can be made whenever it's needed.

        So, basically everything that Schwarzer Kater has created can easily be run after a successful install of Kubuntu without screwing up the installation. And, if you really like Canonical's corporate decision about Snaps, then you're good to go.

        Stay with us here at Kubuntuforums and you will learn a lot! I've used Linux for a very long time, and I still learn stuff almost every day
        The next brick house on the left
        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



        Comment


          #5
          ok, that makes sense. thank you for your response!

          Comment


            #6
            Originally posted by zahtar View Post
            Thank you very much for investing time to write this! It is really helpful for a non-IT user like me.

            I´d like to ask, why aren´t such choices available during installation? A non-IT use who does not know about this forum cannot experience Kubuntu the same way like someone who took the above steps. For example, someone wanting to use Flatpaks and Appimages, who doesn´t know of the above guide will need to search the web for quite a while until reaching here. Is it possible to include such options during installation? At least for 24.04.01?

            Thanks again for your time!
            Options are not included as the installer is be designed simple and using reasonable defaults.

            To be honest, as a very long time user, I only do maybe one of these items at most, and not on every install I do.
            #1 on the list was fixed by or before release day, for example.
            #2 depends on the system, and setting it to a lower value definitely does not always fix the thing it is being used for. Again, it depends on the system, and 10 may or may not be the best value.



            These are optional things to do, but tbh not at all are "essential" in my opinion. But that is just my own opinion.
            On a random website or social media post, I'd say it was a clickbait tile.
            However, I do know that this is most definitely not, not from the Stygian Tabby.
            Last edited by claydoh; Jul 03, 2024, 10:10 PM. Reason: I runned out of cat synonyms.

            Comment


              #7
              I have 3.2G RAM and the installer allocates 512MB swap, which I find low for my use. Increasing it is always on my first to do list.

              Comment


                #8
                I have a 16.GB SWAP partition, and it's never been used to any significant amount - maybe a few MB on occasion.
                The next brick house on the left
                Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                Comment


                  #9
                  As of this very moment:
                  Code:
                  tqn@triton~$ free -h 
                                total        used        free      shared  buff/cache   available
                  Mem:           3,2Gi       2,1Gi       299Mi        33Mi       1,1Gi       1,1Gi
                  Swap:          2,0Gi       505Mi       1,5Gi
                  ​
                  I concur, 16GB ram should rarely need swap.
                  Last edited by Snowhog; Jul 12, 2024, 08:12 PM.

                  Comment


                    #10
                    When I had 16gb RAM I could easily hit swap, if I was doing numerous tasks. Gaming, virtual machines with usable amounts of RAM. Multiple desktop Activities and browser profiles

                    32 GB I seldom hit swap. Just one game I think.

                    Now that I'm back down to 16, and an older system, I notice it getting a little bit crowded again.
                    Last edited by Snowhog; Jul 07, 2024, 07:00 AM.

                    Comment


                      #11
                      I just came across this thread while browsing. Interesting read. I have a question re the fstab bit. I did an upgrade from 23.10 to 24.04 so I'm not sure if that issue applies to me. However, when I input
                      Code:
                      sudo cat /etc/fstab
                      to read the contents, I don't see the line you mentioned. My output reads:
                      Code:
                      # /etc/fstab: static file system information.
                      #
                      # Use 'blkid' to print the universally unique identifier for a
                      # device; this may be used with UUID= as a more robust way to name devices
                      # that works even if disks are added and removed. See fstab(5).
                      #
                      # <file system> <mount point> <type> <options> <dump> <pass>
                      # / was on /dev/nvme0n1p6 during installation
                      UUID=95074288-3534-43ab-b809-5f39f76c54e3 / ext4 errors=remount-ro 0 1
                      # /boot/efi was on /dev/nvme0n1p1 during installation
                      UUID=86F5-D00D /boot/efi vfat umask=0077 0 1
                      # /home was on /dev/nvme0n1p7 during installation
                      UUID=4f22ef78-effa-4170-a4ef-fba6eabd2fdd /home ext4 defaults 0 2
                      # swap was on /dev/nvme0n1p5 during installation
                      UUID=3d654f71-2943-4b2d-800f-db8c30c1532e none swap sw 0 0
                      .

                      Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
                      _______________________________________________
                      Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

                      Comment


                        #12
                        Originally posted by Princey View Post
                        to read the contents, I don't see the line you mentioned. My output reads:
                        You are fine. As I mentioned, the fstab thing was only an issue for pre-release versions of 24.04, and was corrected before final release.
                        Last edited by claydoh; Jul 13, 2024, 10:13 PM.

                        Comment


                          #13
                          Originally posted by claydoh View Post
                          You are fine. As I mentioned, the fstab thing was only an issue for re-release versions of 24.04, and was corrected before final release.
                          Thanks Claydoh
                          Challenges are what that keeps us from the borderline of boredom in life's journey. Linux user no. 419401 currently running Kubuntu 24.04
                          _______________________________________________
                          Current System: Beelink Mini PC, AMD Ryzen 7 5800H 8 Core(Up to 4.4GHz), 32GB DDR4 RAM 1TB NVME M.2 SSD, SER5 MAX Mini Desktop Computer with TCL BeyondTV5 serving as my monitor. ​

                          Comment


                            #14
                            I have a question for number 4. I have Kubuntu installed on an ssd enclosure and not my pc so would that be considered having only Kubuntu installed or Kubuntu/Windows installed?

                            Comment


                              #15
                              Is your SSD always attached and mounted at boot? Or is it only attached to an already booted system when you feel the need for some Linux?
                              The next brick house on the left
                              Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                              Comment

                              Working...
                              X