This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

➡️ Arch based

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

Package management for Arch-based systems involves tools and processes for installing, updating, and removing software packages. These systems typically use a rolling release model, providing the latest software versions. Package management ensures that software dependencies are resolved and that the system remains up-to-date. It also allows users to customize their installations with minimal bloat.

1 - 🖥️pacman

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the pacman command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#                ██████╗  █████╗  ██████╗███╗   ███╗ █████╗ ███╗   ██╗
#                ██╔══██╗██╔══██╗██╔════╝████╗ ████║██╔══██╗████╗  ██║
#                ██████╔╝███████║██║     ██╔████╔██║███████║██╔██╗ ██║
#                ██╔═══╝ ██╔══██║██║     ██║╚██╔╝██║██╔══██║██║╚██╗██║
#                ██║     ██║  ██║╚██████╗██║ ╚═╝ ██║██║  ██║██║ ╚████║
#                ╚═╝     ╚═╝  ╚═╝ ╚═════╝╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝
                                                                     

# All the following command work as well with multiple package names

# To search for a package
pacman -Ss <package name>

# To update the local package base and upgrade all out of date packages
pacman -Suy

# To install a package
pacman -S <package name>

# To uninstall a package
pacman -R <package name>

# To uninstall a package and his depedencies, removing all new orphans
pacman -Rcs <package name>

# To get informations about a package
pacman -Si <package name>

# To install a package from builded package file (.tar.xz)
pacman -U <file name/file url>

# To list the commands provided by an installed package
pacman -Ql <package name> | sed -n -e 's/.*\/bin\///p' | tail -n +2

# To list explicitly installed packages
pacman -Qe

# To list orphan packages (installed as dependencies and not required anymore)
pacman -Qdt

# You can't directly install packages from the Arch User Database (AUR) with pacman.
# You need yaourt to perform that. But considering yaourt itself is in the AUR, here is how to build a package from its tarball.
# Installing a package from AUR is a relatively simple process:
# - Retrieve the archive corresponding to your package from AUR website
# - Extract the archive (preferably in a folder for this purpose)
# - Run makepkg in the extracted directory. (makepkg-s allows you to install any dependencies automatically from deposits.)
# - Install the package created using pacman
# Assuming $pkgname contains the package name.
wget "https://aur.archlinux.org/packages/${pkgname::2}/$pkgname/$pkgname.tar.gz"
tar zxvf "$pkgname.tar.gz"
cd "$pkgname"
# Build the package
makepkg -s
# Install
sudo pacman -U <package file (.pkg.tar.xz)>

# Arch Linux sort installed packages by size - This version accounts for the MiB/KiB suffix output by pacman these days.
pacman -Qi | grep 'Name\|Size\|Description' | cut -d: -f2 | paste - - - | awk -F'\t' 'BEGIN{ s["MiB"]=1024; s["KiB"]=1;} {split($3, a, " "); print a[1] * s[a[2]], "KiB", $1}' | sort -n

pacman -Fs libusb-0.1.so.4
# Arch Linux: Search for missing libraries using pacman If, while using a program, you get an error similar to: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory Use pacman or pkgfile to search for the package that owns the missing library https://wiki.archlinux.org/index.php/General_troubleshooting#Message:_%22error_while_loading_shared_libraries%22 Show Sample Output:
        # extra/libusb-compat 0.1.5-1
            # usr/lib/libusb-0.1.so.4

#==============================##==============================#
# CMD PACMAN						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2 - 🖥️yaourt

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the yaourt command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#                ██╗   ██╗ █████╗  ██████╗ ██╗   ██╗██████╗ ████████╗
#                ╚██╗ ██╔╝██╔══██╗██╔═══██╗██║   ██║██╔══██╗╚══██╔══╝
#                 ╚████╔╝ ███████║██║   ██║██║   ██║██████╔╝   ██║   
#                  ╚██╔╝  ██╔══██║██║   ██║██║   ██║██╔══██╗   ██║   
#                   ██║   ██║  ██║╚██████╔╝╚██████╔╝██║  ██║   ██║   
#                   ╚═╝   ╚═╝  ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝   ╚═╝   
                                                                    
                                                                  
# All pacman commands are working the same way with yaourt.
# Just check the pacman cheatsheet.
# For instance, to install a package : 
pacman -S <package name>
yaourt -S <package name>
# The difference is that yaourt will also query the Arch User Repository,
# and if appropriate, donwload the source and build the package requested.

# Here are the commands yaourt provides while pacman doesn't :

# To search for a package and install it
yaourt <package name>

# To update the local package base and upgrade all out of date package, including the ones from 
AUR and the packages based on development repos (git, svn, hg...)
yaourt -Suya --devel

# For all of the above commands, if you want yaourt to stop asking constantly for confirmations, 
use the option --noconfirm

# To build a package from source
yaourt -Sb <package name>

#==============================##==============================#
# CMD YAOURT						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

3 - 🖥️yay

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the yay command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#  ██╗   ██╗ █████╗ ██╗   ██╗
#  ╚██╗ ██╔╝██╔══██╗╚██╗ ██╔╝
#   ╚████╔╝ ███████║ ╚████╔╝
#    ╚██╔╝  ██╔══██║  ╚██╔╝ 
#     ██║   ██║  ██║   ██║  
#     ╚═╝   ╚═╝  ╚═╝   ╚═╝

# present package selection menu
yay [Search Term]

# print system statistics
yay -Ps

# print update list
yay -Pu

# clean unneeded dependencies
yay -Yc

# downloads PKGBUILD from ABS or AUR
yay -G

# generates development package
# DB used for devel updates.
yay -Y --gendb

# normal update but also check for development package updates
# and use PKGBUILD modification time and not version to determine update
yay -Syu --devel --timeupdate

# instalation
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░