Обновление арч линукс через терминал

How to Update Manjaro and Other Arch-based Linux Distributions

How to update Manjaro Linux or Arch Linux? This sounds like a simple topic, isn’t it? While this is certainly useful for beginners, reading these ‘simple topics’ often lead to some hidden gems that you might not be aware of.

For example, in this article, I’ll discuss both GUI and terminal ways of updating your Arch-based distribution. The interesting part is the subtle difference between pacman -Syu and pacman -Syyu (with an extra y) commands.

I am a Manjaro user and I love it. I have written this tutorial using Manjaro but the command part is applicable for other Arch-based distributions as well. I’ll also show the GUI application for Manjaro.

  • Updating Manjaro and other Arch-based distributions using command line
  • Updating Manjaro Linux using GUI

Let’s see how to keep your software and system up-to-date

Update Arch or Manjaro Linux using the command line

You can access the terminal by typing Ctrl+Alt+T or by clicking on the menu button on the left-hand side corner and finding it by typing terminal. Personally, I find that updating any distro through the terminal is faster and more robust.

The simplest way to update Arch Linux distributions is to use:

It compares the local package database against the distribution’s software repository. If there are any new package versions available, you will be prompted to type yes to update the outstanding packages.

Читайте также:  Установить линукс последней версии

Sudo Pacman Syu

There is another way to update your system.

You can notice the extra y in this command. The extra y forces the package manager to download the package database regardless of whether there is any change in the versions.

This is helpful when you have a corrupted package database and you want to force synchronization.

I don’t recommend using sudo pacman -Syyu all the time because it will unnecessarily take a long time to synchronize the database. It will also consume more network bandwidth.

Sudo Pacman Syyu

As you can see in the image above, even if my system is up-to-date, the database is still being updated.

Note: Arch-based Garuda Linux provides a custom command garuda-update which should be using the pacman command underneath.

Recommended Read:

Источник

10+ pacman command examples Arch Linux [Cheat Sheet]

Arch is targeted more toward power users who like to have complete customization control over how their packages are built and added to the system. Arch uses a package-management tool called pacman, which can be used to install both pre-built, binary packages and custom-built packages. The user has complete control over what gets installed, what gets upgraded (or not), and what ­dependencies are used when creating custom-built packages. Arch can use packages from its repository or can generate a package by building it on the user’s system.

The packages for Arch Linux are compressed tar files. The default compression is currently in transition from XZ to Zstandard, with file extensions *.xz and *.zst , respectively. The tar file contains both the package metadata and the files to be installed.

Читайте также:  What is bash variable in linux

In 2010, Arch switched the default package compression from *.gz to *.xz , and at the end of 2019 switched again to *.zst .

We can use tar to view the contents of a pacman package:

$ tar -tvf acpi-1.7-2-x86_64.pkg.tar.xz -rw-r--r-- root/root 376 2017-08-15 19:06 .PKGINFO -rw-r--r-- root/root 3239 2017-08-15 19:06 .BUILDINFO -rw-r--r-- root/root 501 2017-08-15 19:06 .MTREE drwxr-xr-x root/root 0 2017-08-15 19:06 usr/ drwxr-xr-x root/root 0 2017-08-15 19:06 usr/share/ drwxr-xr-x root/root 0 2017-08-15 19:06 usr/bin/ -rwxr-xr-x root/root 23560 2017-08-15 19:06 usr/bin/acpi drwxr-xr-x root/root 0 2017-08-15 19:06 usr/share/man/ drwxr-xr-x root/root 0 2017-08-15 19:06 usr/share/man/man1/ -rw-r--r-- root/root 729 2017-08-15 19:06 usr/share/man/man1/acpi.1.

This example shows the simplicity of the package format. Several files in the root of the archive contain the package metadata. They are described in the Arch Linux Wiki and include:

  • .PKGINFO Contains all the metadata needed by pacman to deal with packages, dependencies, and so on.
  • .BUILDINFO Contains information needed for reproducible builds. This file is present only if a package is built with Pacman 5.1 or newer.
  • .MTREE Contains hashes and timestamps of the files, which are included in the local database so pacman can verify the package’s integrity.
  • .INSTALL An optional file used to execute commands after the install/upgrade/remove stage (this file is present only if specified in the PKGBUILD).
  • .Changelog An optional file kept by the package maintainer documenting the changes of the package.

The .MTREE file is a compressed list of timestamps, permissions, file sizes, and cryptographic hashes. We can extract it by piping the tar output into zcat :

$ tar -xOf acpi-1.7-2-x86_64.pkg.tar.xz .MTREE | zcat #mtree /set type=file uid=0 gid=0 mode=644 ./.BUILDINFO time=1502816810.765987104 size=3239 md5digest=0fef5fa26593908cb0958537839f35d6 sha256digest=75eea1aee4d7f2698d662f226596a3ccf76e4958b57e8f1b7855f2eb7ca50ed5 ./.PKGINFO time=1502816810.745986656 size=376 md5digest=c6f84aeb0bf74bb8a1ab6d0aa174cb13 sha256digest=83b005eb477b91912c0b782808cc0e87c27667e037766878651b39f49d56a797 /set mode=755 ./usr time=1502816810.602650109 type=dir ./usr/bin time=1502816810.685985311 type=dir ./usr/bin/acpi time=1502816810.682651903 size=23560 md5digest=4ca57bd3b66a9afd517f49e13f19688f sha256digest=c404597dc8498f3ff0c1cc026d76f7a3fe71ea729893916effdd59dd802b5181 ./usr/share time=1502816810.592649885 type=dir ./usr/share/man time=1502816810.592649885 type=dir ./usr/share/man/man1 time=1502816810.699318943 type=dir ./usr/share/man/man1/acpi.1.gz time=1502816810.609316926 mode=644 size=729 md5digest=fb0da454221383771a9396afad250a44 sha256digest=952b21b357d7d881f15942e300e24825cb3530b2262640f43e13fba5a6750592

Syntax to use Pacman command

The syntax for pacman command is as follows:

$ sudo pacman option [package]

Источник

Оцените статью
Adblock
detector