Online Linux Terminal Logo
OnlineLinuxTerminal
Package ManagementCLI Reference

$apt

Debian and Ubuntu command-line package management tool.

Syntax DefinitionPOSIX standard
apt [OPTIONS] COMMAND
Linux Community2.4k Online

Chat with real Linux users, learn new commands & get free cheat sheet PDFs.

Try `apt` Live in Interactive Sandbox

Zero-install client simulation with real-time feedback.

Open in Fullscreen Workspace↗
bash — terminal

Overview & How apt Works

`apt` (Advanced Package Tool) is the high-level package manager for Debian, Ubuntu, and derivative Linux distributions. It handles searching, installing, upgrading, and removing software packages and resolving dependencies automatically.

Common Flags & Command Options

Flag / OptionDescription
updateDownload updated package lists and version metadata from repositories.
upgradeUpgrade all installed packages to their newest available versions.
install [pkg]Download and install specified software package.
remove [pkg]Uninstall specified package while keeping configuration files.

Practical Real-World Examples

Example #1Install cowsay ASCII utility in sandbox
apt install cowsay && cowsay "Linux is awesome!"

Installs the cowsay utility into the virtual filesystem and runs it.

Sample Output:
< Linux is awesome! > -------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||

Frequently Asked Questions

What is the difference between apt and apt-get?

`apt` is designed for interactive end-user use with color output and progress bars. `apt-get` is the lower-level tool preferred in automated bash scripts.