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

How to use the Linux apt-get command

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the relevant knowledge of how to use the Linux apt-get command, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this Linux apt-get command article. Let's take a look at it.

Apt-get added that the apt-get command is the APT package management tool in the Debian Linux distribution. All Debian-based distributions use this package management system. The deb package can wrap together files for an application, roughly like the installation files on Windows.

Syntax apt-get [OPTION] PACKAGE option apt-get install install new package apt-get remove uninstall installed package (retain configuration file) apt-get purge uninstall installed package (delete configuration file) apt-get update update package list apt-get upgrade update all installed packages apt-get autoremove uninstall packages that are no longer needed dependent package upgrade apt-get autoclean will have been removed Remove the apt-get clean delete package installation package from the hard disk-c: specify the configuration file. Parameter management instructions: management operations for APT software packages

Package: specifies the package to manipulate.

The first step for an example to use the apt-get command is to introduce the necessary software libraries. Debian's software libraries are a collection of all Debian software packages, which are stored on some public sites on the Internet. Add their addresses and apt-get can search for the software we want. / etc/apt/sources.list is the configuration file that holds these address lists in the following format:

Deb web or [ftp address] [release name] main/contrib/non- [free] our commonly used Ubuntu is a Debian-based distribution. We use the apt-get command to get this list. Here are some of my common commands:

Run this command after modifying / etc/apt/sources.list or / etc/apt/preferences. In addition, you need to run this command periodically to ensure that your package list is up to date:

Apt-get update installs a new package:

Apt-get install packagename uninstalls an installed package (retains the configuration file):

Apt-get remove packagename uninstalls an installed package (removes the configuration file):

Apt-get-purge remove packagename backs up installed or uninstalled software on your hard drive, so if you need space, you can use this command to delete software that you have deleted:

The apt-get autoclean apt command will also delete the backup of the installed software, but this will not affect the use of the software:

Apt-get clean updates all installed packages:

Apt-get upgrade upgrades the system to a new version:

Apt-get dist-upgrade runs this command periodically to clear the .deb files of packages that have been uninstalled. In this way, you can free up a lot of disk space. If your needs are urgent, you can use apt-get clean to free up more space. This command deletes the .deb file of the installed software package as well. In most cases, you won't use these .debs files anymore, so if you're worried about running out of disk space, it might be worth a try:

This is the end of apt-get autoclean's article on "how to use the Linux apt-get command". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use Linux apt-get commands". If you want to learn more, you are 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

Development

Wechat

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

12
Report