How to Install a .deb Package via Command Line

  • By:SEO
  • 2024-05-18
  • 238

Step-by-Step Guide: Installing a .deb Package through Command Line Interface (CLI)

Debian-based systems such as Ubuntu and Debian itself rely heavily on .deb packages for software installation. While graphical interfaces are user-friendly, mastering the command line can provide greater control and flexibility. Here’s a detailed guide on installing .deb packages through the command line:

Step 1: Download the .deb Package

Before installation, you need to have the .deb package file ready. You can download it from trusted sources or repositories using tools like wget or curl.

Step 2: Navigate to the Directory Containing the .deb File

Open your terminal and cd into the directory where the .deb file is located. This is crucial for the subsequent installation steps.

Step 3: Install the .deb Package

Now comes the key step. Use the following dpkg command to install the .deb package:

sudo dpkg -i package_name.deb

Replace ‘package_name.deb’ with the actual name of the .deb file you downloaded.

Step 4: Resolve Dependencies

If you encounter dependency issues during installation, use the following command:

sudo apt-get install -f

This command will attempt to fix missing dependencies.

Step 5: Verify the Installation

After installation, check if the package was installed successfully. You can use commands like dpkg-query or the software itself to confirm.

Step 6: Remove the .deb Package (Optional)

If you wish to uninstall the package later, you can use the following command:

sudo dpkg -r package_name

This will remove the installed .deb package.

By following these steps, you can effortlessly install and manage .deb packages through the command line. Embrace the power of the CLI for efficient software management on your Debian-based system.

Happy installing!



CONTACT US

contact-email
contact-logo

Foshan Soonk Packaging Machine Co., Ltd.

We are always providing our customers with reliable products and considerate services.

    If you would like to keep touch with us directly, please go to contact us

    INQUIRY

      INQUIRY

        Online Service