PDF download Download Article
The beginner's guide to installing programs and compiling source code on Ubuntu Linux
PDF download Download Article

If you're new to Linux, Ubuntu is a great choice. After all, it comes pre-installed with so much useful software, including Firefox, GIMP, and LibreOffice. But what if you need to install other apps? Fortunately, installing programs is super easy in Ubuntu, even if you're just getting started. This wikiHow article will walk you through 5 ways to install software in Ubuntu, from using package managers like Ubuntu Software, Apt, and Snap Store, to compiling programs from source code.

Things You Should Know

  • Use Ubuntu Software Center or Snap Store to install software from a graphical interface that's similar to your phone or tablet's app store.
  • Use apt-get (or its GUI front-end Synaptic) to install DEB packages from a variety of repositories.
  • The Snap Store is a handy tool for finding and installing snap packages, which are quick and easy to install and come with all necessary dependencies.
Method 1
Method 1 of 6:

Ubuntu Software

PDF download Download Article
  1. It's the orange suitcase icon with an "A" inside. You can also open Ubuntu Software by searching for the word software in the Activities search bar. [1]
    • Ubuntu Software is the simplest way to install software, as it has a handy graphical user interface that displays screenshots, space requirements, and even user reviews.
    • If you already have a .deb package that you downloaded from the web, you can install it using Ubuntu Software—just double-click the .deb file to open it in Ubuntu Software, where you'll see an Install button.
  2. Use the categories to find apps to install, or search for something in particular.
    Advertisement
  3. You'll see a description of the app, user ratings, the total installation size, screenshots, and other details.
    • If the app is already installed, you'll see a Permissions button at the top, along with a red button that you can use if you'd like to uninstall it.
  4. Once you enter your password to confirm, the software will download and install.
  5. Removing software you installed through Ubuntu Software is just as easy as installing it. Here's how:
    • Open Ubuntu Software and click Installed at the top.
    • Locate the application you want to uninstall. You can use the search box to filter the list or just scroll until you find it.
    • Click the application and select Remove
    • Enter your password to confirm. [2]
  6. Advertisement
Method 2
Method 2 of 6:

Advanced Package Tool (Apt)

PDF download Download Article
  1. If you know the name or type of software package you want to install, you can easily install it from the command line using the apt-get command. To launch the Terminal , press Ctrl + Alt + T on your keyboard.
    • Apt is a great alternative to Ubuntu Software if you want to make sure you always have the latest versions of your favorite software. With Ubuntu Software, newer versions of the packages you install are not released nearly as often as they are on the various repositories available through Apt.
    • You will need to use the sudo command to install packages with Apt. If you want to install software packages without root access, try the Snap Store .
  2. Before installing a software package, you'll always want to make sure the package index is up to date.
    • If there's a package you're looking for that's only available from a certain repository, you can add the repository using the add-apt-repository command. Check the instructions for the package you want to install for the repository name, public key, and other information.
  3. If you already know the name of the package you want to install, you can skip this step. If not, you can use the apt-cache search command to search for a specific string of letters in all existing software packages and their descriptions.
    • For example, if you were looking for Firefox, you'd type apt-cache search firefox . All Firefox package names would appear in the search results.
    • It's not necessary to use sudo when searching the package index, as root permissions aren't needed.
  4. If you want to know the version number, languages available, and dependencies, you can use the command apt-cache showpkg <packagename> to view this information.
    • For example, running apt-cache showpkg firefox displays information about the package called firefox .
  5. For example, to install the Firefox package, we'd use sudo apt-get install firefox .
    • You can install multiple packages at a time by entering additional package names separated by spaces. For example, if you wanted to install both Firefox and the Chromium browser, you would enter sudo apt-get install firefox chromium-browser .
    • If you already have the package installed and try to install it again, the package manager will check for a newer version and install it if it exists.
    • After installing packages, you can use the sudo apt-get clean command to delete any package install files and free up some space on your hard drive.
  6. You can also use Apt to install updates for all installed software or for individual software packages.
    • First, run sudo apt-get update to update the package databases.
    • If you just want to see which updates are available but not install them, use sudo apt-get list –upgradable .
    • Then, run apt-get upgrade to check for and install updates for all software you've installed through apt-get. Or, if you just want to update one application, use sudo apt-get install <packagename instead.
  7. If you want to uninstall software you installed from the package tool, just use sudo apt-get remove <packagename> .
    • If you also want to delete the package configuration files from the software you're removing, use sudo apt-get remove <packagename> --purge . [3]
  8. Advertisement
Method 3
Method 3 of 6:

Synaptic

PDF download Download Article
  1. Synaptic is a graphical interface for Apt that's great if you don't like to type commands but need more control than what you get with Ubuntu Software. With Synaptic, you can easily browse and manage repositories, install and remove programs, and update individual packages.
    • To install Synaptic, you'll need to open a Terminal window and run sudo apt-get install synaptic .
  2. Once Synaptic is installed, you'll find it in System > Administration > Synaptic Package Manager . [4]
  3. You'll see categories in the left panel, which you can click to view packages. You can also search for package names or types by keyword using the Search option at the top of the window.
    • If you need to add a repository or manage existing repositories, you can do so in Settings > Repositories .
    • Synaptic shares its repository list with apt, so if you've added repositories to /etc/sources.list or used add-apt-repository in the past, that repository is already available in Synaptic.
  4. Select a package and click Properties to view details, including required dependencies, a list of files to be installed, versions, and a description of the software.
  5. If you find something you want to install, right-click the package and click Mark for Installation . You can install multiple packages at once by marking them each for installation before you continue.
    • If prompted, click Mark to mark additional changes. [5]
  6. This installs all of the marked packages on your PC.
  7. Updating packages is super easy with Synaptic:
    • First, update the repository list by pressing Ctrl + R or clicking Reload .
    • Right-click a package and select Mark for Upgrade .
    • Mark additional packages for upgrade if desired, then click Apply .
    • Click Apply again to confirm.
  8. To remove a package you installed with Synaptic or Apt, just right-click the package and select Mark for Removal . Click Apply , and then Apply again to remove the package.
  9. Advertisement
Method 4
Method 4 of 6:

Snap Store

PDF download Download Article
  1. The Snap Store is another great place to install Ubuntu apps, especially if you want the most up-to-date versions of apps and don't want to worry about installing dependencies. [6] The Snap package manager comes preinstalled on Ubuntu, but if you want access to the Snap Store, you'll need to install it using the command sudo snap install snap-store in a Terminal window.
    • Apps like Spotify , Slack , and Chromium can all be installed through the Snap Store. [7]
    • If you have a file that ends with .snap already downloaded, you can install it without the Snap Store. Just run snap install ./filename.snap at the prompt, replacing filename.snap with the name of your file.
    • If the file isn't signed, you can add the --dangerous flag to the end of the command to skip the signature verification.
  2. This launches the Snap Store interface.
  3. The Snap Store is divided into categories, such as Games, Productivity, and Photo and Video. You can also search for an app by name or type by typing keywords into the search field.
  4. This downloads and installs the software on your Linux PC.
    • Software installed from Snap packages update automatically, so there's no need to worry about updating your software. However, if you want to update your software manually, you can run the command snap refresh at the prompt, or run snap refresh --time to find out when the next update is scheduled. [8]
    • You can also browse for and install Snaps from the command line, similar to using apt-get .
      • Run the snap command alone to learn how to use it. [9]
      • Run snap find <your search terms> to search for a title, developer, or type of software.
      • Once you find a package name, you can learn more about it using snap info <packagename> .
    • To install a package, run snap install <packagename> .
  5. To remove software you installed from a Snap, you'll want to use a Terminal.
    • To see all installed snap packages, run snap list .
    • To delete a package, use snap remove <packagename> .
  6. Advertisement
Method 5
Method 5 of 6:

Installing RPMs with Alien

PDF download Download Article
  1. You can do this easily from the command line by typing sudo add-apt-repository universe and pressing Enter .
    • To install software from an RPM in Ubuntu, you'll need a program called Alien. Alien can both install RPMs and convert them to DEB packages.
  2. This updates the package list so you can download files from the Universe repository.
  3. Follow the on-screen instructions to confirm the installation.
  4. Replace package_name.rpm with the name of the RPM package you're installing.
    • Alternatively, you can convert the RPM to DEB using sudo alien package_name.rpm . Once converted, you can install it with Dpkg using sudo dpkg package_name.rpm . [10]
  5. Advertisement
Method 6
Method 6 of 6:

Compiling from Source Code

PDF download Download Article
  1. Whether you wrote your own program or downloaded software that needs to be compiled (often in the format of a .tgz or .tar.gz file ), you'll need to install the build-essential package first. This ensures you have the right tools for compiling from source code . [11]
    • Open a Terminal window.
    • Run sudo apt-get update to update the package database.
    • Run sudo apt-get install build-essential to install the package.
  2. If you downloaded software from the web, it'll typically be compressed into a tarball ending with the .tar.gz or .tar.bz2 file extension.
    • First, use cd to enter the directory to which you saved the file.
    • If the file ends with .tgz or .tar.gz, run the command tar -xvf <filename> .
    • If the file ends with .tar.bz2, use the command tar -xjvf <filename> .
    • Run the command ls -a to view the extracted files and folders.
  3. Depending on the software you're building, it may contain a helpful file with special installation instructions. Use the cd command to enter the new directory from your decompressed file, then run ls -a to look for such a file.
    • If you see a file with instructions, for example, one called README, you can read it using cat README (to display the whole file) or more README (to read it page-by-page).
    • If both files are found, read them both!
  4. If your installation file tells you to use certain flags or to skip this step, stick to those instructions. Otherwise, run the command ./configure to prepare the installation.
    • If there isn't a file called configure in this directory, re-read the instructions for installation steps. There may be additional instructions available where you downloaded the file, such as in a GitHub repository .
    • Sometimes you'll find a script called install.sh instead—if you see this, make it executable using chmod u+x install.sh and then run it using ./install-sh .
    • If you get an error about missing dependencies or libraries, you'll need to install whichever dependencies are required before you can compile the software. It'll be easiest to do this using a package manager like #Advanced Package Tool (Apt) rather than downloading and compiling more source code. Once the required packages are installed, re-run the configure script until there are no errors.
  5. Just type make and press Enter to compile the source code into an executable program. This step may take a while, depending on the speed of your computer.
  6. If you're just compiling something that you'll be using in your own home directory, this step isn't necessary. But if you want to add it to a system binary directory, run this command. Once you've done this, the program is installed.
  7. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do you install .rpm files?
    Community Answer
    You need to install the following packages: alien dpkg-dev debhelper build-essential. Then, run sudo alien package.rpm (where package.rpm is the name of your file). This converts the file into a .deb package. You can now run sudo dpkg -i package.deb to install the debian file.
  • Question
    How can I install programs downloaded from websites?
    Community Answer
    If you've downloaded a file in .tar.gz format, you can install it using the Terminal. First, extract the file into a new folder. Once extracted, open Terminal and navigate to the new folder. Type "./configure" and press Enter. After that has finished, type "make" and press Enter. Finally, type "sudo make install" and enter your password when prompted. This will install the program.
  • Question
    How do I install the software if I do not know the administrative password?
    Community Answer
    You can't install the software without an admin password.
See more answers
Ask a Question
      Advertisement

      Video

      Tips

      • If you are making changes to your sources list (/etc/apt/sources.list), be sure to update it with sudo apt-get update .
      • Never add a software repository that you don't trust.
      • All of the repositories available in the Apt and Synaptic are stored in /etc/apt/sources.list or as individual files in /etc/apt/sources.list.d. You can take a look at those files to see which repositories you'll be updating and downloading from.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 1,019,758 times.

      Is this article up to date?

      Advertisement