HB Computer Security | Aide Memoire
  • Introduction
  • Core Technical Skills
    • Core Skills
      • Linux
        • Getting to Know Linux
          • Using the Shell
            • Shells, Terminals, and Virtual Consoles
            • Choose your Shell
            • Shell Commands
              • Non-PATH Commands
              • Command History
                • Command Line Editing
                  • Keystrokes for Navigating Command Lines
                  • Keystrokes for Editing Command Lines
                  • Keystrokes for Cutting and Pasting Text from within Command Lines
                • Command Line Recall
                  • Keystrokes for Command Line Recall
              • Connecting and Expanding Commands
                • Piping Between Commands
                • Sequential Commands
                • Expanding Commands
            • Shell Variables
              • Common Shell Variables
            • Aliases
            • Create your Own Shell Environment
              • Modification Ideas
          • Navigating the Linux File System (LFS)
            • Filesystem Commands
            • Listing Files and Directories
            • File Permissions and Ownership
              • Modifying Permissions with chmod
              • Modifying Default Permissions with umask
              • Change File Ownership with chown
            • Copying, Moving, and Removing Files
            • Finding Files
              • locate
              • find
              • grep
            • Downloading Files
              • axel
              • wget
              • curl
                • User-Agent: Googlebot
          • Working with Text Files
            • Using vim and vi to Edit Text Files
              • Starting with vi
              • Adding Text
              • Moving Around in the Text
            • Text Manipulation
        • System Administration
          • Installing Linux
            • Installing from Live Media
            • Installing in the Enterprise
            • Partitioning Hard Disks
              • Tips for Creating Partitions
          • Account Administration
            • The root Account
              • Becoming root with su
              • sudo
                • The /etc/sudoers File
                • Granting sudo privileges
                  • visudo Guidance
                • Useful sudo Hints
            • Other Administrative Accounts
            • Standard User Accounts
              • Risks of userdel: Orphaned Files
          • Graphical Remote Administration
            • Cockpit
              • Installation Guide
            • Remote Desktop Protocol with xrdp
              • Installation and Configuration
            • Remote Desktop with vnc
              • Installation and Configuration
              • Running VNC as a System Service
          • Managing Running Processes
            • Listing Processes
              • ps
              • top
              • htop
            • Backgrounding and Foregrounding
              • Starting a Background Process
              • Using Foreground and Background Commands
            • Killing and Recining Processes
              • kill and killall
          • Managing Software
            • Managing Software from the Desktop
            • Going Beyond the Limitations of Software Center
              • Debian Packages
                • Advanced Package Tool (apt)
                • Repositories
                • dpkg
        • Shell Scripting
          • Variables
            • Command Substitution
            • Arguments
          • Reading User Input
          • if, else, and elif
          • BOOLEAN Logic
          • Loops
            • for Loops
            • while Loops
          • Functions
          • Local Vs Global Variables
          • Summary
        • Securing Linux
      • Windows
        • Security Hardening
Powered by GitBook
On this page

Was this helpful?

  1. Core Technical Skills
  2. Core Skills
  3. Linux
  4. System Administration
  5. Managing Software
  6. Going Beyond the Limitations of Software Center
  7. Debian Packages

Advanced Package Tool (apt)

apt

Allow me to introduce you to a reliable mate - the Advanced Package Tool, or apt for short. apt can do two things:

  1. It can fetch and install software from online repositories - it's most common use

  2. apt can also install software from local files you already have on your computer or network

So, whether you want to get stuff from the internet or use something you've got saved, APT's got your back. It may seem a bit old-school compared to fancy graphical tools, but apt is incredibly versatile and quickly becomes a staple in most people's command-line toolkit. In most cases, apt teams up an action verb like update or install, and true to its name, does exactly what is says on the tin!

Here are some command examples you can experiment with:

Command
Explanation

sudo apt update

This updates the list of available software available in the target repositories. Note that this doesnt actually update the software, just the list

sudo apt-install package

Pretty obvious - installs the named application(s)

sudo apt-cache search package

Use this to search the list of available software for a match for any string you provide - matches are made by both package names and descriptions which is handy if you dont know the exact name of what you need

sudo apt-cache pkgnames

This lists all the packages installed on the system

sudo apt remove package

Use this to uninstall a named package, or list of packages

sudo apt purge package

Uninstalls packages, however, whereas sudo apt remove will leave certain package artefacts like config files, purge nukes em all!!

sudo apt upgrade

Use this command to perform a mass update of all packages on the system. Note that this is normally preceeded by sudo apt update to ensure the upgrade provides the latest versions

PreviousDebian PackagesNextRepositories

Last updated 1 year ago

Was this helpful?