How can I install the downloaded. deb package in the terminal?

To install a downloaded .deb package in the terminal, follow these steps:

  1. Open a terminal window: Go to the Applications menu, type “Terminal” in the search box, and select “Terminal” to open it.

  2. Navigate to the directory where the .deb package is saved: Use the “cd” command followed by the directory path. For example, if the package is saved in the Downloads directory, type “cd ~/Downloads” and press Enter.

  3. Install the package: Use the “sudo dpkg -i” command followed by the package name and press Enter. For example, if the package name is “mypackage.deb”, type “sudo dpkg -i mypackage.deb” and press Enter.

  4. Enter your password: The system will prompt you to enter your password. Type it and press Enter. Note that the password will not be displayed as you type it.

  5. Wait for the installation to complete: The system will show the progress of the installation process on the screen. The process may take a few moments to complete.

  6. Check if the package was installed successfully: Use the “dpkg -l” command followed by the package name to check if the package was installed successfully. For example, if the package name is “mypackage”, type “dpkg -l mypackage” and press Enter. If the package was installed successfully, you should see its details on the screen.

  7. Start the installed application: If the package contains an application, you can start it by typing the name of the application in the terminal and pressing Enter. For example, if the application is called “myapp”, type “myapp” and press Enter to start it.

Example:
Suppose you have downloaded the package named “google-chrome-stable_current_amd64.deb” in the Downloads folder, then you can follow the steps as below:

1
2
cd ~/Downloads
sudo dpkg -i google-chrome-stable_current_amd64.deb

Then enter your password when prompted. Wait for the installation to complete. If the installation is successful, you can start the application by typing “google-chrome” in the terminal and pressing Enter.