Difference between revisions of "Apt command"

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to navigation Jump to search
(Created page with "The apt is a command used on Debian, Ubuntu and other Linux distribution. It provides a high-level commandline interface for the package management system. It is intended...")
 
Line 1: Line 1:
 
The apt is a command used on Debian, Ubuntu and other [[Linux distribution]]. It provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like [[apt-get command]] and [[apt-cache command]].
 
The apt is a command used on Debian, Ubuntu and other [[Linux distribution]]. It provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like [[apt-get command]] and [[apt-cache command]].
  
== Syntax ==
+
== apt command Syntax ==
 +
The syntax is
 +
<pre syntax="bash">
 +
apt [-h] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] {list | search | show | update | install pkg [{=pkg_version_number | /target_release}]...  | remove pkg...  |
 +
          upgrade | full-upgrade | edit-sources | {-v | --version} | {-h | --help}}
 +
</pre>
 +
 
 +
== apt Commands ==
 +
All apt command must run by the root user either using the [[sudo command]] or [[su command]].
 +
 
 +
* '''list''' - list packages based on package names
 +
* '''search''' - search in package descriptions
 +
* '''show''' - show package details
 +
* '''install''' - install packages
 +
* '''remove''' - remove packages
 +
* '''autoremove''' - Remove automatically all unused packages
 +
* '''update''' - update list of available packages
 +
* '''upgrade''' - upgrade the system by installing/upgrading packages
 +
* '''full-upgrade''' - upgrade the system by removing/installing/upgrading packages
 +
*  '''edit-sources''' - edit the source information file
  
 
== Examples ==
 
== Examples ==
 
== See also ==
 
== See also ==
 
* [https://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/ 19 Ubuntu / Debian Linux apt Command Examples]
 
* [https://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/ 19 Ubuntu / Debian Linux apt Command Examples]

Revision as of 08:09, 16 November 2017

The apt is a command used on Debian, Ubuntu and other Linux distribution. It provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get command and apt-cache command.

apt command Syntax

The syntax is

apt [-h] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] {list | search | show | update | install pkg [{=pkg_version_number | /target_release}]...  | remove pkg...  |
           upgrade | full-upgrade | edit-sources | {-v | --version} | {-h | --help}}

apt Commands

All apt command must run by the root user either using the sudo command or su command.

  • list - list packages based on package names
  • search - search in package descriptions
  • show - show package details
  • install - install packages
  • remove - remove packages
  • autoremove - Remove automatically all unused packages
  • update - update list of available packages
  • upgrade - upgrade the system by installing/upgrading packages
  • full-upgrade - upgrade the system by removing/installing/upgrading packages
  • edit-sources - edit the source information file

Examples

See also