Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common package management and commands of Linux

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "what are the common package management and commands for Linux", which is easy to understand and clear. I hope it can help you solve your doubts. Here, let the editor lead you to study and learn what are the common package management and commands for Linux.

Brief introduction

On Linux, there are several ways to install software: system package manager installation, source code compilation, binary package, and now desktop systems use more Snap, AppImage, Flatpak and so on.

Linux package management

DPKG

Dpkg is a package management system of the Debian family, and the package suffix is .deb.

The apt command can quickly install dpkg packages to resolve package-to-package dependencies.

Common commands:

# synchronize the latest software information from the software source and cache it to the local apt update # install the specified package and install other packages on which it depends. Apt install [package] # update software version apt upgrade # find the software, do not add parameters is to show all the software packages, add the keyword is to search the specified package apt list zlib* # list the installed software version apt list-- installed # keyword search software name and description apt search zlib* # uninstall package, but the configuration file will still save the apt remove [package] # uninstall package And delete the configuration file apt purge [package] # Uninstall dependent apt autoremove automatically installed due to installation software # remove all downloaded packages apt clean # similar to clean, but remove expired packages (that is, packages that cannot be downloaded or useless) apt autoclean

RPM

RPM is a red hat package management system with a package suffix of .rpm.

Yum is a front-end tool like apt, which can solve the dependency between packages very well.

Dnf is the upgraded version of yum and the next generation of yum. The parameters of dnf and yum are basically the same.

Common commands:

# install the software,-y means directly install without asking yum-y install nginx # reinstall yum reinstall nginx # find the software yum list nginx # check the package group (all groups will be listed without adding the group name) yum grouplist # find the package name according to the keyword yum search nginx # find the package name based on the file path If you do not know the specific path of the file, you can also use wildcards to match yum provides / usr/bin/vim yum provides * / vim # check to update the yum check-update # update software, if you do not execute the package name is to update all packages yum-y update # if you do not update the specified package you can use the-x parameter yum-y update-x nginx # uninstall yum remove nginx # uninstall and delete configure yum erase nginx # update index Can speed up the speed of finding dependent packages yum makecache

Pacman

Pacman is the package management system of the Arch family. The new version package suffix is .pkg.tar.zst, and the previous version is .pkg.tar.xz.

Common commands:

# update system pacman-Syu # synchronizes the local package database with the remote repository pacman-Sy pacman-Su # installation package pacman-S [package] # update the warehouse and install the package pacman-Sy [package] # update the local package, generally used for downgrading, if url will automatically download pacman-U / var/cache/pacman/pkg/yay-10.1.2-1-x86_64.pkg.tar.zst # only delete the package Keep all its installed dependencies pacman-R [package] # while deleting packages, delete all its dependencies that are not used by other installed packages pacman-Rs [package] # while deleting packages Delete all programs that depend on this package pacman-Rsc [package] #] do not check pacman-Rd when deleting packages [package # search the repository for packages containing keywords pacman-Ss keywords # search for installed packages pacman-Qs keywords # View detailed information about packages pacman-Qi package names # list the package files pacman-Ql package names # download packages only, do not install pacman-Sw package names # clean up uninstalled package files The package file is located in the / var/cache/pacman/pkg/ directory pacman-Sc # to clean up all cache files pacman-Scc

Apk

Alpine uses apk for package management, and uses the apk-help command to view the complete package management commands.

Common commands:

# Update the local image source index from the remote image source apk update: # installation package apk add openssh openntp vim apk add-no-cache mysql-client apk add docker-update-cache-repository http://mirrors.ustc.edu.cn/alpine/v3.4/main/-allow-untrusted # install the specified version of the package apk add asterisk=1.6.0.21-r0 apk add 'asterisk1.6.1' # Uninstall and delete apk del Openssh openntp vim # upgrade software apk upgrade # specify upgrade part of the package apk add-upgrade busybox # find all available packages apk search # find the available packages and their description content apk search-v # find packages apk search-v 'nginx*' # find specific packages apk search-v-d' docker' # list all installed packages apk Info # displays the complete package information apk info-a zlib # shows the package apk info-- who-owns / sbin/lbu to which the specified file belongs

Other managers

There are other package managers, but I haven't used them.

Zypper is the openSUSE package manager. Portage is the Gentoo package manager.

The above is all the contents of the article "what are the common package management and commands of Linux?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report