Using the APT-GET Package Manager
APT-GET is the default package manager for Debian-based Linux distributions, such as Ubuntu. It provides a command-line interface for installing, updating, and removing software packages.
Installing Packages with APT-GET
To install a package using APT-GET, you can use the following command:
sudo apt-get install <package_name>
For example, to install the web browser Firefox, you would run:
sudo apt-get install firefox
Updating Packages with APT-GET
To update all installed packages on your system, use the following command:
sudo apt-get update
sudo apt-get upgrade
The apt-get update
command fetches the latest package information from the configured repositories, while apt-get upgrade
actually installs the available updates.
Removing Packages with APT-GET
To remove a package, use the following command:
sudo apt-get remove <package_name>
If you want to remove the package and its dependencies, use the purge
command instead:
sudo apt-get purge <package_name>
Searching for Packages with APT-GET
To search for a package, use the following command:
apt-cache search <search_term>
This will display a list of packages that match the search term.
Managing Package Dependencies with APT-GET
APT-GET automatically resolves dependencies when installing, upgrading, or removing packages. It ensures that all required dependencies are installed or removed along with the target package.
By understanding these basic APT-GET commands, you can effectively manage software packages on your Ubuntu-based Linux system.