Inštalácia Debian 11

Inštalácia Debian 11

0, pridanie užívateľa do sudoers

musíš to urobiť ako root

su

pihi nahradíš menom užívateľa ktorého chceš pridať a terminál pri použití príkazu sudo nebude vyžadovať heslo

echo "pihi  ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/pihi

1, Kernel linux-image

Archív Linuxových kernelov

Zisti nainštalovanú verziu

uname -r

Zisti dostupné verzie v tvojom úložisku

sudo apt-cache search linux-image

Nainštaluj kernel napr.

sudo apt install linux-image-5.18.0-3-amd64

Hotovo reštart a užívaj výhody nainštalovaného jadra.

sudo reboot

Inštalácia najnovšieho Kernelu aj s automatickou aktualizáciou

Pridáš nové zdroje pre apt do súboru sources.list

echo "deb http://deb.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list

Vytvoríš preferencie pre inštaláciu balíčkov. Toto je dôležité pri budúcich aktualizáciách.

sudo nano /etc/apt/preferences

a vložíš do súboru nasledovné

Package: *
Pin: release a=bullseye
Pin-Priority: 500

Package: linux-image-amd64
Pin: release a=unstable
Pin-Priority: 900

Package: *
Pin: release a=unstable
Pin-Priority: 100

Načítaš znovu databázu balíčkov.

sudo apt update

Môžeš skontrolovať ktoré balíčky sú pripravené na upgrade.

apt list --upgradable

Môžeš upgradovať.

sudo apt upgrade -y

Hotovo reštart a užívaj výhody najnovšieho jadra.

sudo reboot

2, Pridanie non-free repozitárov

The contrib and non-free repos have many useful packages that can’t be found in Debian’s default repositories like:

  • Proprietary Drivers
  • Proprietary Codecs
  • Proprietary Fonts
  • And many more!

Open Software & Updates > Debian Software tab > Enable DFSG and non-DFSG compatible software > Close > Reload

Adding contrib and non-free repositories on Debian 11

3, Inštalácia driverov

Nvidia

Open-source drivers have gotten better these days. Still, proprietary drivers usually perform better so you may wish to use them instead.

# Install tool for hardware detection
sudo apt install nvidia-detect

# Perform the scan
sudo nvidia-detect

# Install recommended driver. It is nvidia-driver for me. Yours could be different.
sudo apt install nvidia-driver

Installing Nvidia drivers on Debian 11

AMD

Similar to NVIDIA, AMD offers its drivers which are also very easy to install.

sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu

If you play games, I would also recommend installing support for Vulkan.

sudo apt install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers

Installing AMD drivers on Debian 11

4, Inštalácia microcode

Microcode is CPU firmware that controls how the processor works. It’s recommended to have the latest microcode to improve your CPU workings.

Open Synaptic Package Manager > Search for microcode > Install either intel-microcode or amd-microcode depending on your CPU

Installing microcode on Debian 11

5, Inštalácia build-essential

It’s a package that includes many dependencies commonly used by different apps so it’s always good to have it installed. We all need it sooner or later.

sudo apt install build-essential dkms linux-headers-$(uname -r)

Installing build-essential on Debian 11

 

6, Inštlácia restricted-extras

In Ubuntu, we can install all restricted packages with ubuntu-restricted-extras. Unfortunately, we don’t have such a package in Debian. Nevertheless, all restricted packages can be installed with the command below.

sudo apt install ttf-mscorefonts-installer rar unrar libavcodec-extra gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-vaapi

Installing restricted-extras on Debian 11

7, Kompatibilita s fontami Microsoft

Although we have installed Microsoft fonts, new Microsoft Office uses Calibri and Cambria which are not available on Linux. With that being said, we have alternatives that are very close in terms of compatibility.

sudo apt install fonts-crosextra-carlito fonts-crosextra-caladea

To learn more about how to use these fonts in Linux, check out the Microsoft fonts compatibility on Linux post.

Installing Microsoft fonts on Debian 11

9, Konfigurácia Swappiness

Decreasing swappiness value is one of the best ways to improve the performance of your system. This forces your Linux system to use RAM, instead of the hard drive. For those of you unfamiliar with Linux swap, check out our post on Linux swap.

Check the current swappiness value by executing:

cat /proc/sys/vm/swappiness # 60 (default)

Open /etc/sysctl.conf file as an administrator:

sudo nano /etc/sysctl.conf

At the end of the file, add vm.swappiness=10 which will reduce swap usage.

Press CTRL + O to save changes and CTRL + X to exit the nano editor.

Now reboot your system for the change to take effect.

Lowering swappiness to 10 on Debian 11

10, Zrýchlenie bootovania

Each time you start your system, the GRUB screen shows up with boot options. We can disable the GRUB screen and boot straight into Debian. This way we won’t have to press the Debian option manually or wait for 5 seconds timeout.

# Open the GRUB config file and set GRUB_TIMEOUT to 0
sudo nano /etc/default/grub

# Update GRUB
sudo update-grub

If you happen to need a GRUB screen, you can still access it by pressing SHIFT on boot.

Setting GRUB timeout to 0 on Debian 11

11, Inštalácia Firewallu

Although there are not many viruses for Linux, it’s advisable to have a firewall that protects against network intrusions.

sudo apt install ufw
sudo ufw enable

We also have a dedicated post on the firewall in Linux so make sure to check it out for more advanced usage.

Firewall on Debian 11

12, Povolit Snap a FlatPak

Snap and FlatPak packages are universal app packaging formats for Linux. That means they work on any Linux distribution.

Open Software Center > Search for gnome software > Select the first entry > Enable Snap and FlatPak in Add-ons section > Restart Software Center

Now you can choose how you would like to install apps. Not all apps support Snap/FlatPak, but the support is getting there.

Enabling Flatpak on Debian 11

13, Predĺžiť životnosť batérie

If you have Debian installed on your laptop, you can squeeze more battery juice by installing tlp (power management tool).

sudo apt install tlp

14, Inštalovať zálohovací program

BackUp programs are often overlooked. That is also the case with Debian 11 which doesn’t have backups by default. I always back up my system and good backups have saved me a few times!

Timeshift is the gold standard for system backups in Linux. It’s also very easy to install and configure.

Open Software Center > Search for Timeshift > Click Install

Upon opening the Timeshift, you’ll probably notice the Wizard button in the top

right side of the app. As the name suggests, this is a user-friendly way of

configuring backup.

Run Wizard and follow these steps:

1. Snapshot Type

  • Select RSYNC

2. Snapshot Location

  • Select the disk where you would like your snapshots to be stored.

3. Snapshot Levels

  • You can choose how many snapshots Timeshift will perform/store on a monthly, weekly, daily, hourly and boot basis

4. User home directories

  • Allows you to decide which folders Timeshift will back up. You should prioritize your home directory, but depending on your space, it won’t hurt to include /root directory as well.

That’s it for Timeshift! In case you accidentally lose your data, open Timeshift, click Restore, select a snapshot that contains the files that you would like to recover and that’s it!

Backup on Debian 11

15, Inštalovať ďalšie témy

To install themes on GNOME, we need to enable the User Themes extension which can be found in the Extensions app. Now, go to the GNOME Look and download any theme you like.

Check out our Top 5 GNOME Themes for some of the most beautiful themes on the market.

Once you’ve picked your theme:

  1. Go to the Files tab
  2. Download the latest release (archive)
  3. Extract archive
  4. Move theme folder to ~/.themes folder (press CTRL + H to see hidden files in your home folder, create folder if you don’t have it)
  5. Open Tweaks
  6. Go to appearance and select your theme!

Following the steps above, you can also install different icon packs, cursors, and much more to make GNOME look the way you want it!

Switching desktop themes on Debian 11

16, Zmeniť vzhľad LibreOffice

LibreOffice is a well-known office suite alternative for Linux. It comes with balanced default settings and it is probably not essentian thing to do after installing Debian 11, but I’ll show you some tips to make it even better.

Appearance:

Open LibreOffice Writer → View → User Interface → Enable Single Toolbar & Tabbed interface

Icons:

Open LibreOffice Writer → Tools → Options → Icon style → Select Colibre.

Customized LibreOffice on Debian 11

17, Povoliť rozšírenia Gnome

Debian uses the GNOME desktop environment as default. We can supercharge GNOME desktop by extending its functionality with GNOME Extensions. Go to GNOME Extensions website and install their browser extension first if you don’t have it already. Now you can install any GNOME Extension with a click of a button! Let’s see how that works in the next tip.

Enabling GNOME extensions on Debian 11

18, Povoliť tray ikony

Many third-party apps like Zoom, Dropbox, Skype don’t show up in the tray on the GNOME desktop. We can fix this by installing TopIcons Plus extension. Click the toggle button and that’s it!

GNOME Extensions can be customized with the Extensions app.

Open Extensions > Click gear icon next to TopIcons Plus > Set try horizontal alignment to right

Enabling tray icons on Debian 11

19, Pridať obrázok užívateľa

Desktop can’t be complete without a personal profile image so make sure to set one!

Open Settings > Users > Add image for your user

Adding user image on Debian 11

20, Zapnúť tlačítka Minimalizovať, Maximalizovať v záhlaví okna

GNOME desktop environment exposes only the close button on application windows. Many users, including me, prefer having the minimize window button as well.

Open Tweaks > Window Titlebars > Enable Minimize

Enabling minimize button on Debian 11

Marek Mihók