Manage packages under Ubuntu 16.04 LTS with the new apt command

Manage packages under Ubuntu 16.04 LTS with the new apt command

 

We have already introduced the new features of Ubuntu 16.04 above . With the release of Ubuntu 16.04 LTS, Ubuntu's package management commands have also changed. The new system uses the APT (Advanced Package Tool) used in the Debian project to complete various The ATP command completely replaces the functions of apt-get, apt-cache, etc. that we introduced in the introduction to the basic operation of Linux package management .

ATP was created to solve a large number of package management problems, hoping to end a major ill of Linux-like early system dependencies. However, the documentation of the ATP command itself is relatively scattered, and it is difficult for users who are just getting started to find its help information.

 

For over a decade, almost all Debian and Ubuntu users have been using apt-get for administrative operations such as installing and removing packages. Now everyone should try to switch to the new APT command too.

Note: In order to take into account the usage habits of old users, Ubuntu 16.04 still retains the apt-get series of commands.

 

Simplify the command line with APT

Below we list the usage of the ATP command in Ubuntu 16.04 LTS compared to the usage of package management in older versions of Ubuntu:

Ubuntu 16.04 LTS Old Edition Ubuntu
apt install package name Alternative to apt-get install package name
apt remove package name Alternative to apt-get remove package name
apt search package name Alternative to apt-cache search package name
apt show package name Alternative to apt-cache show package name
apt update Alternative to apt-get update
apt upgrade Alternative to apt-get upgrade
apt list –installed
  • Alternative to dpkg --get-selections | grep -v deinstall
  • Alternative to dpkg -l
apt list –upgradable apt-get -u upgrade –assume-no
pt edit-sources
  • Alternative to echo 'new line of text' | sudo tee -a /etc/apt/sources.list
  • Substitute sudo nano /etc/apt/sources.list
apt autoremove Alternative to apt-get autoremove
apt purge package name Alternative to apt-get purge package name

 

 

Original: https://www.sysgeek.cn/ubuntu-16-04-apt-instead-of-apt-get/

Reprinted from: Managing Packages under Ubuntu 16.04 LTS with the New apt Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326625213&siteId=291194637