The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    bc135's Linux Package & Archive Installation Guide

    Discussion in 'Linux Compatibility and Software' started by Bog, Jun 10, 2007.

  1. Bog

    Bog Losing it...

    Reputations:
    4,018
    Messages:
    6,046
    Likes Received:
    7
    Trophy Points:
    206
    bc135's Linux Package & Archive Installation Guide
    Whatever distribution you use, chances are that you'll eventually find some program that you want, but that your package manager doesn't have. So you want that really cool note-taking program; you google it and download it to your desktop. Okay, now what? Double-clicking doesn't work the way it did in Windows... you're in charge now. So how do you install it? Using the dreaded command-line. This guide is meant to help you save some of your hair.

    The purpose of this guide is to briefly educate both novice and experienced Linux users alike in the installation of package and archive files typically retrieved from the Internet.

    To start off, an important command to remember is the cd command; it is used to direct the Terminal/Konsole to a specific directory. You can then use it to execute commands on whatever files or folders are in that directory. The cd command is used like so:

    cd directory,
    where the directory is the filesystem address.


    Installing Packages
    The directions for installing any of the following package files are simple: open your Terminal or Konsole, use the cd command to navigate to the directory where the package is located, and execute the command listed for the specific package type as root.

    This detail is important since installing a program is considered a system-wide change that Linux only gives to the super user, the only system administrator. The super user's (sometimes called the root user) commands are executed without regard for permissions and such, and so it should be used with caution. To execute a command as root, precede the command with the word sudo. For example, sudo dpkg -i tomboy-notes.deb installs the Debian package tomboy-notes.

    Now that the basics are clear, lets get started:

    - Debian Packages
    Debian packages share the *.deb extension.
    dpkg -i packagename.deb to install a new package

    - RPM Packages
    RPM Packages share the *.rpm extension.
    rpm -ivh packagename.rpm to install a new package
    rpm -Uvh packagename.rpm to upgrade an installed package
    rpm -e packagename.rpm to uninstall package
    rpm -q packagename.rpm to view if package is already installed


    Installing Archives
    Archives are a little trickier than packages since instructions vary from package to package; for example, the ./configure command for compiling programs from source can vary. Nevertheless the method of installation is similar to that of a package, it just involves a little more work. To start, using the Terminal/Konsole, use the cd command to navigate to the directory containing the archive.

    - Tarballs
    *.tar.bz2
    tar xvfj archivename.tar.bz2
    This will extract the files to a new folder. Next, use the cd command to navigate to the newly created directory. After that, type:
    ./configure, then:
    make, and finally:
    sudo make install

    *.tar.gz archives are the same as *.tar.bz2 archives except they use a different command for extraction:
    tar -xzf archivename.tar.gz
    sudo make install

    This is only a basic guide to help newbies get started, but I actually keep this document in my Home folder for my own use, and it is quite helpful; it might even be a good idea to sticky this for future forum visitors. If you'd like to add instructions for other package or archive types, or perhaps correct a mistake, or if you just have questions, please message me via NBR's private message system. I'd be happy to help make this guide more all-encompassing.
     
  2. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    Most distributions will allow you to just double-click .deb and .rpm files and they'll install them using a graphical package manager (a la GDebi for Ubuntu). Also, some downloads (such as Adobe flash) will contain runnable files (usually .sh files) that you'll have to just execute in a terminal and you don't need to do make and make install. This is one of the downfalls of Linux for new people IMO; it's pretty hard to learn all the ways you need to install applications.
     
  3. Bog

    Bog Losing it...

    Reputations:
    4,018
    Messages:
    6,046
    Likes Received:
    7
    Trophy Points:
    206
    I put this info together over a long time, but there are still probably package types missing. I just posted it in the hopes that people would find it useful as I did, especially considering that this thread topic was one of the things that some new Linux users wanted to learn on Guatam's thread.