apt-getmakes use ofdpkg (Debian Package)to do the actual package installations (so in a sense they’re “installing” to the same place)apt-cachequeries the package cache of the Advanced Packaging Tool (APT)
apt-get and apt-cache commands are unified into a single apt (Advanced Packaging Tool) command
Configuration
a /etc/apt/sources.list file that specifies the online repositories
Commands
https://help.ubuntu.com/community/AptGet/Howto
sudo apt-get update
downloads the package lists from the repositories and “updates” them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
sudo apt-get upgrade
will fetch new versions of packages existing on the machine if APT knows about these new versions by way of apt-get update
sudo apt-get dist-upgrade
will upgrade the linux kernel itself will do the same job which is done by apt-get upgrade, plus it will also intelligently handle the dependencies, so it might remove obsolete packages or add new ones.
sudo apt-cache search package-name
queries the packagecache of the Advanced Packaging Tool (APT)
sudo apt-get install package-name
installs package-name