Basic Linux Commands

  • Post last modified:April 2, 2024
  • Reading time:4 mins read
  • Post comments:0 Comments

Basic Debian based Linux Commands:

These commands are specific to Debian-based systems that use APT as their package manager. Other distributions may use different package managers, such as yum (used by Red Hat and CentOS) or zypper (used by openSUSE).

——————————————————————————————————————————————————————————————————————————————————————————

  • apt-get:
    • Usage: sudo apt-get [options] [package]
    • Description: Package management command for installing, upgrading, or removing software packages. It is part of the Advanced Package Tool (APT) system.
  • apt:
    • Usage: sudo apt [options] [package]
    • Description: APT command-line interface. Similar to apt-get, it is used for handling packages. It provides more user-friendly and streamlined package management.
  • dpkg:
    • Usage: sudo dpkg [options] [package.deb]
    • Description: Low-level package management tool for Debian-based systems. It allows you to install, remove, and inspect individual Debian packages.
  • apt-cache:
    • Usage: apt-cache [options] command
    • Description: Query the APT package cache for package information. Useful for searching and retrieving package details without installing.
  • update:
    • Usage: sudo apt-get update
    • Description: Downloads the package lists from the repositories and updates them to get information on the newest versions of packages and their dependencies.
  • upgrade:
    • Usage: sudo apt-get upgrade
    • Description: Upgrades all currently installed packages to their latest versions.
  • dist-upgrade:
    • Usage: sudo apt-get dist-upgrade
    • Description: Similar to upgrade but handles changing dependencies with new versions of packages.
  • install:
    • Usage: sudo apt-get install [package]
    • Description: Installs the specified package or packages along with their dependencies.
  • remove:
    • Usage: sudo apt-get remove [package]
    • Description: Removes the specified package without removing its configuration files.
  • purge:
    • Usage: sudo apt-get purge [package]
    • Description: Removes the specified package along with its configuration files.
  • autoremove:
    • Usage: sudo apt-get autoremove
    • Description: Removes orphaned packages that were installed as dependencies but are no longer needed.
  • clean:
    • Usage: sudo apt-get clean
    • Description: Clears out the local repository of retrieved package files. Useful for freeing up disk space.
  • history:
    • Usage: history
    • Description: Displays a list of previously executed commands.
  • sudo:
    • Usage: sudo [command]
    • Description: Executes a command with administrative privileges.
  • man:
    • Usage: man [command]
    • Description: Displays the manual page for a specific command, providing detailed information and options.

These are just a few examples of the many commands available in a Debian-based Linux system. Each command has various options and can be customized to suit specific needs. The man command is particularly helpful for exploring additional options and details for each command.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.