Arch linux lts что это

Обновлено: 04.07.2024

Arch Linux is very configurable and you can tweak it endlessly. But I believe these 10 things to do first after installing Arch Linux are the most essential for great user experience and security.

You can watch the video tutorial or continue reading below.

1. Install the LTS kernel

The first thing to do after installing Arch Linux is to install the LTS (long-term support) kernel, which is recommended installing if you want to make your Arch system more stable. The LTS kernel gets less frequent updates but it is patched with all the security fixes. First, check if you do not have the LTS kernel already:

If there is not lts in the kernel name, you have a standard Arch Linux kernel. So, you can install the LTS kernel and you also need to reconfigure the GRUB bootloader:

Reboot, and select the LTS kernel in Advanced options of the GRUB menu. After the boot, check if you indeed use the LTS kernel with uname -r .

If everything is fine and your active kernel is the LTS kernel. Feel free to remove the non-lts kernel

2. Install Microcode

Microcode is some kind of software installed on your processor. While microcode can be updated through the BIOS, the Linux kernel is also able to apply these updates during boot. These updates provide bug fixes that can be critical to the stability of your system. For Intel processors install intel-ucode , for AMD processors install linux-firmware . After the installation also update the GRUB:

3. Disable GRUB delay

GRUB is a multiboot loader, developed by the GNU project that allows us to choose which Operating System to boot from the installed ones. It is mainly used in GNU/Linux operating systems. You see this GRUB menu every-time you start the system.

Sometimes this is annoying because it wastes our time. Let’s make the system skip it and load as fast as possible. Open the GRUB configuration file:

Add the following lines to at the end of the file:

Then download this file 31_hold_shift.gz, uncompress it and place it to /etc/grub.d/ .

Make this file executable, and update the GRUB config:

This won’t show GRUB menu during the system load. To show GRUB menu, you need to hold the Shift key during the start-up.

4. Install some key packages

Here, I recommend only cross-desktop packages such as fonts, spell checking dictionaries, Gstreamer plugins, java etc. These are the packages I recommend, check their names in the command below:

I will do a separate video about the applications I install in KDE Plasma 5 desktop.

5. Enable the firewall

A firewall is a computer program that controls the access of a computer to the network and of network elements to the computer, for security reasons. The best way to set up a firewall on Linux is to use iptables, which is a built-in Linux firewall. But it is quite complicated and deserves a separate tutorial. Here, I will show you how to set up an uncomplicated firewall which is fine for a regular user.

First, we must install it:

Next, we must enable the service:

Check the status of the service, to make sure it works:

The default rules to deny incoming and allow outgoing are good for most of the users.

Finally, enable its autostart with the system.

6. Encrypt your home directory

It is wise to make a back up of all your data before this step. Encrypting your home folder is a very good idea if you want to have even more protection for your files. The simplest way to encrypt your home is to use ecryptfs-migrate-home script.

To run it, you need to log out. Switch to a virtual console by simultaneously pressing Ctrl+Alt+F2. In this console, login with the root user name and administrative password and check what processes are owned by your user:

There should be no output. If some processes are active you can kill them or reboot and login as a root again.

Next, install these programs:

Now, you can start encrypting your home folder:

Use the same passphrase as your login password. It is required for auto-mounting during the login.

Log out and log in as a regular user and mount your encrypted home folder:

Unwrap the decryption passphrase and write it down or save outside of your computer.

Now, make sure the files auto-umount and wrapped-passphrase exist:

Then open system-auth file:

And after the line auth required pam_unix.so insert the following content:

Next, above the line containing password required pam_unix.so paste this line:

And finally, after the line session required pam_unix.so write:

See the final result in the image below.

Reboot and check if you can log in to your user account. If everything is fine, it is safe to remove the backup of your home which was created during the migration. It is named with your username and some random characters.

7. Remove orphans

After installing Arch Linux and configuring it, you can little clean your system. This is important if you want to save disk space and improve disk performance. You can remove unused packages (orphans) and their configuration files.

I have no unused packages on my system (image above), but you may have some listed after that command.

8. Optimize pacman's database

Arch Linux performance can be further enhanced by optimizing the pacman package manager with the following command:

This improves the speed at which pacman accesses the system’s databases.

9. Check for errors

First, check for failed systemd services:

Second, check for errors in logfiles:

If you find some errors, google them. If they are serious, try to fix. The errors you see on my system (image above) are not very dangerous as far as I know.

10. Backup the system

It is always good to have a backup of the system, so you can recover it in case there is a problem with it. And it is the last thing to do after installing Arch Linux.

I have already described how to back up your system in this post. Please, read it. Here, I only provide the commned to back up everything except some unnecessary directories:

As a conclusion, I would like to say that Arch Linux is very configurable and adaptable to many situations. So, there are many other things do after installing Arch Linux, but these 10 are the most essential in my view.

I hope this tutorial was useful for you. Let me know what you would add to this list by commenting below. And please share it.

Регулярное обслуживание системы необходимо для правильной работы Arch в течение определенного периода времени. Своевременное обслуживание является привычной практикой многих пользователей.

Contents

Проверка на наличие ошибок

Неудачный запуск служб systemd

Проверьте, возможно какие-либо службы systemd неудачно запустились:

Файлы журналов

Посмотрите на наличие ошибок файл журнала, находящийся в /var/log , а также высоко приоритетные ошибки в журнале systemd:

Резервное копирование

Создавайте резервные копии важных данных через регулярные промежутки времени. Эти данные включают в себя конфигурационные файлы, установленные пакеты и каталоги, такие как /etc , /home , /var и для серверных установок, также /srv .

Смотрите различные приложения синхронизации и программ резервного копирования которые подойдут в вашем случае. Также смотрите восстановление системы.

Резервное копирование можно автоматизировать с помощь Systemd/Таймеры.

Файлы настроек

Перед внесением изменений в файлы настроек, создайте резервную копию. Таким образом, вы можете вернуться к рабочей версии в случае возникновения проблем. Такие редакторы как vim и emacs могут сделать это автоматически, а также такая утилита как etckeeper держат /etc в системе контроля версий (VCS).

Список установленных приложений

Ведите список всех установленных пакетов, а если полная переустановка неизбежна, то легче будет воссоздать первоначальное окружение.

База данных Pacman

Заголовки LUKS

Обновление системы

Если в системе есть пакеты из AUR, внимательно обновите все из них.

Избегайте определенных команд pacman

Избегайте частичные обновления, то есть никогда не запускайте pacman -Sy , вместо того чтобы использовать pacman -Syu .

Избегайте использования опции -d с Pacman. pacman -Rdd пакет пропустит проверку зависимостей при удалении пакета. В результате пакет, создающий критическую зависимость, может быть удален, что приведет к нарушению системы.

Частичные обновления не поддерживаются

Arch Linux является роллинг-релиз дистрибутивом. Это означает, что когда новая версия библиотек поступит в репозиторий, разработчики и доверенные пользователи пересоберут все пакеты в репозиториях, которые должны быть пересобраны с библиотеками. Например, если два пакета зависят от той же библиотеки, обновление только одного пакета может также обновить библиотеку (в качестве зависимости), которая может сломать другой пакет, который зависит от старой версии библиотеки.

Именно поэтому частичные обновления являются не поддерживаемыми. Не используйте pacman -Sy пакет или любой эквивалент, такой как pacman -Sy а затем pacman -S пакет , всегда обновляйтесь (с помощью pacman -Syu ) перед установкой пакета. По той же причине будьте очень осторожны при использовании IgnorePkg и IgnoreGroup . Если в системе есть локально установленные пакеты (например, пакеты из AUR), пользователи должны будут пересобрать их, когда их зависимост получит игнор.

Если было частичное обновление, и бинарные файлы сломаны, потому что они не могут найти зависимые библиотеки, не "исправляйте" проблему при помощи символьной ссылки. Библиотеки получают игнор, когда они не имеет обратной совместимости. Выполнение команды pacman -Syu с правильно синхронизированным зеркалом решит проблему, пока сам "pacman" работоспособен.

Прочитайте перед обновлением системы

Сигналы предупреждений во время обновления

Как можно быстрее договаривайтесь с новыми файлами настроек

Когда вызывается pacman, могут быть созданы файлы .pacnew и .pacsave . Pacman уведомит вас, когда это произойдет, и пользователи должны разобраться с этими файлами в кратчайшие сроки. Пользователи могут обратиться к вики-страницы Pacman/Pacnew and Pacsave (Русский) для подробных инструкций.

Кроме того, подумайте о других файлах настроек которые вы можете скопировать или создать. Если пакет содержал пример настроек, который был скопирован в ваш домашний каталог, проверьте, был ли создан новый.

Откат сломанных обновлений

Используйте менеджер пакетов для установки программного обеспечения

Pacman делает работу намного лучше, чем ваше ручное содержание файлов. Если вы устанавливаете пакеты вручную, вы в скором времени, рано или поздно, забудете что вы делали, устанавливали конфликтующее программное обеспечение, устанавливали в неправильное место и т.д. Вместо этого, узнайте, как создать пакет.

Выбирайте драйверы с открытым исходным кодом

Будьте осторожны с неофициальными пакетами

Используйте меры предосторожности при использовании пакетов из AUR или неофициальных пользовательских репозиториев. Большинство из них содержатся обычными пользователями, и, следовательно, не могут иметь те же стандарты, что и в официальных репозиториях. Будьте осторожны с вспомогательными утилитами для работы с AUR, которые весьма упрощают установку пакетов AUR. Всегда проверяйте PKGBUILD'ы на вменяемость, признаки ошибок или вредоносного кода, прежде чем собрать и/или установить пакет.

Обновите список зеркал (mirrorlist)

Обновите список зеркал pacman, так как качество зеркал может меняться со временем, и некоторые из них могут перейти в офлайн или их скорость загрузки может ухудшиться. Смотрите Зеркала.

Очистите файловую систему

При поиске файлов для удаления, важно найти файлы, которые занимают большую часть дискового пространства. Программы, которые вам помогут можно найти в:

Старые файлы настроек

Старые файлы настроек могут конфликтовать с новыми версиями программного обеспечения, или портиться со временем. Периодически удаляйте ненужные файлы настроек, особенно в вашей домашней папке и

/.config . По тем же причинам, будьте осторожны при совместном использовании домашних папок между установками.

Посмотрите на следующие папки:

Для большей информации смотрите XDG Base Directory support.

Чтобы сохранить домашний каталог чистым от временных файлов, созданных в неправильном месте, будет хорошо иметь список нежелательных файлов и удалять их регулярно, например, с помощью rmshit.py.

rmlint может быть использован для поиска и при необходимости удалении дубликатов файлов, пустых файлов, рекурсивных пустых каталогов и сломанных символических ссылок.

Неиспользуемые пакеты

Удалите неиспользуемые пакеты из системы, тем самым освободив место на диске и упростив обслуживание.

Кэш пакетов

Удалите ненужные файлы .pkg из /var/cache/pacman/pkg/ чтобы освободить дисковое пространство. .

Сломанные симлинки

Старые, сломанные символьные ссылки могут находится в вашей системе; вы должны удалить их. Найти примеры того как их найти указаны тут (Англ.) и там (Англ.).

Для быстрого просмотра списка всех сломанных символьных ссылок в вашей системе, воспользуйтесь:

Затем проверьте и удалите ненужные записи из этого списка.

Советы и приёмы

Следующие советы, как правило не требуется, но некоторые пользователи могут счесть их полезными.

Используйте проверенные программные пакеты

Роллинг-релиз Arch даёт преимущество пользователям, которые хотят попробовать новейшие функции и получить последние обновления как можно скорее, но это может сделать обслуживание системы более трудным. Для упрощения технического обслуживания и повышения стабильности, старайтесь избегать ультрасовременное программное обеспечение и устанавливайте только зрелое и проверенные программное обеспечение. Такие пакеты имеют меньше шансов получить сложные обновления, такие как основные изменения настроек или удаление особенностей. Предпочитайте программное обеспечение, которое имеет сильное и активное сообщество разработчиков, а также большое количество компетентных пользователей, для того чтобы упростить поддержку в случае возникновения проблем.

Избегайте использования тестового (testing) репозитория, даже отдельных пакетов из testing. Эти пакеты являются экспериментальными и не подходят для стабильной системы. Кроме того, избегайте разрабатываемых пакетов, которые собираются непосредственно из апстрима. Они обычно находятся в AUR, и содержат в названии: "dev", "devel", "svn", "cvs", "git", и т.д.

Установите пакет linux-lts

Пакет linux-lts представляет собой альтернативный пакет ядра Arch, и доступен в core репозитории. Эта конкретная версия ядра имеет долгосрочную поддержку (LTS) от апстрима, включая исправления безопасности, и некоторые Бэкпорты. Это будет полезным, если вы предпочитаете стабильность и менее частые обновления ядра, или если вы хотите иметь запасное ядро, в случае если новая версия ядра вызывает проблемы.

The Linux kernel is an open-source monolithic Unix-like computer operating system kernel.

Arch Linux is based on the Linux kernel. There are various alternative Linux kernels available for Arch Linux in addition to the latest stable kernel. This article lists some of the options available in the repositories with a brief description of each. There is also a description of patches that can be applied to the system's kernel. The article ends with an overview of custom kernel compilation with links to various methods.

Kernel packages are installed onto the file system under /boot/ . To be able to boot into kernels, the boot loader has to be configured appropriately.

Contents

Officially supported kernels

Community support on forum and bug reporting is available for officially supported kernels.

Compilation

Following methods can be used to compile your own kernel:

/Arch Build System Takes advantage of the high quality of existing linux PKGBUILD and the benefits of package management. /Traditional compilation Involves manually downloading a source tarball, and compiling in your home directory as a normal user.

  • Best way to increase the speed of your system is to first tailor your kernel config to your architecture and processor type.
  • You can reduce the size of your kernel (and therefore build time) by not including support for things you do not have or use. For example support for things like bluetooth, video4linux, 1000Mbit ethernet, etc.

Some of the listed packages may also be available as binary packages via Unofficial user repositories.

Unofficial kernels

Debugging regressions

Try linux-mainline AUR to check if the issue is already fixed upstream. The stickied comment also mentions a repository which contains already built kernels, so it may not be necessary to build it manually, which can take some time.

It may also be worth considering trying the LTS kernel ( linux-lts ) to debug issues which did not appear recently. Older versions of the LTS kernel can be found in the Arch Linux Archive.

If the issue still persists, bisect linux-git AUR and report the bug on the kernel bugzilla. It is important to try the "vanilla" version without any patches to make sure it is not related to them. If a patch causes the issue, report it to the author of the patch.

The LTS kernel in Arch Linux is often recommended installing if you want to make your Arch system more stable. But what is the kernel? What are the differences between the default Linux and the LTS kernels, and which one should you choose? Finally, how to install the LTS kernel in Arch Linux? All these questions are about to be answered.

What is the kernel?

The kernel is the core program of the system. It is responsible for managing memory, CPU and other hardware of the system. Many drivers are built-into the kernel. It also communicates with the installed applications.

Actually, Linux is the kernel. The desktop environment, applications and all the other stuff is just a superstructure above the kernel. So, using the word Linux is not very accurate, if you mean a distribution. For example, Android uses the Linux kernel but it is not called Linux. That is why many people say GNU/Linux when they mean Linux distributions. Linux is much simpler to say.

Why install the LTS kernel?

If you have not changed your kernel in Arch Linux, by default you have the latest stable kernel version.

The LTS (long-term support) version is advantageous if stability is your first priority. It doesn’t mean that the latest kernel, or the default kernel, is less stable, it just means that the LTS kernel won’t be updated as frequently. So, there is a smaller chance of some conflicts after you update your system. Besides, the LTS kernel doesn’t change much, so if it works fine on your system it is likely that it will keep working properly.

On the other hand, the latest kernel is updated frequently and there are constant changes to it, so there is a higher chance of breaking something after the update. The main version of the LTS kernel doesn’t change but it keeps receiving security fixes and it may also receive some feature backports.

So, what should you do?

Installing the latest kernel is good if you want to have the latest feature, and this is what many Arch users aim for. If you have the latest hardware, it is possible that the LTS kernel may not fully support it. So, you have to use the latest kernel OS.

How to install the LTS kernel in Arch Linux

To install and activate the LTS kernel in Arch Linux, follow these steps:

Check your what kind of kernel you have:

If it does not have ‘lts’ in its name, it is not the LTS kernel, To install the LTS kernel, run this command:

Next, you need to register the new kernel in your bootloader. For the GRUB bootloader, run this command:

Reboot your Arch Linux.

When you see this menu, select the Advanced options.

To get this GRUB menu, you may need to press SHIFT key or ESC key just when the boot is starting.

Boot with the LTS kernel from the Advanced options.

After the system boot, open the terminal and check the kernel version. It should be the LTS kernel.

It is safe to remove the non-lts kernel now, which is a default kernel in Arch Linux. And do not forget to re-generate GRUB config, so it doesn’t show a removed kernel:

After these steps, you will have only the LTS kernel in your system. If you do not remove the default kernel, Arch Linux will use the default kernel after the next reboot. If you use the latest kernel, you can install the LTS kernel as a fallback kernel. In case that something happens to your latest kernel, you can boot with the LTS kernel.

Benefits of the LTS Kernel

Personally for me, the LTS kernel has several advantages.

It works better with VirtualBox. I had some problems with the latest kernel and VirtualBox because the kernel updates were more frequent than the updates for VirtualBox. Once VirtualBox just stopped working and to fix it, I needed to switch to an older kernel.

It’s better for a multi-boot system. I also like the infrequent updates of the LTS kernel. I multi-boot my Arch Linux with several other Linux OSes and I need to update my GRUB manually every kernel update. As the LTS kernel is not updated as frequently as the latest kernel, I don’t have to update my GRUB often with the LTS kernel.

You may also like these tips and tricks after installing Arch Linux. Thanks for reading.

Читайте также: