web analytics
Home / How-to Guides / How to Install Application in Ubuntu using Command Line

How to Install Application in Ubuntu using Command Line

Install Application in Ubuntu using Command Line“How to install an application in Ubuntu” The Most asked question by the majority of newbie. People who have migrated from windows to Ubuntu or trying their luck with Ubuntu, the basic problem they face is installing software on Ubuntu. However, Ubuntu has its own GUI Software Center and Software package in the format of .deb which make installing software on Ubuntu an easy task. Anyway, we would be looking forward to installing software through the command line. Installing software through the command line will save your valuable time since the keyboard is much faster than the mouse, anyhow installing software though the command line will help you understand the Linux better. In case in the future, you switch to another Linux distros the process of installing software using the command line will always remain the same unlike the GUI.

Basic of  Software’s in Linux

Software in Linux is different than the usual software you find in windows like .exe setup file. Software’s in Linux contains packages, individual unit, modules and libraries. When you install a software, you need to install all those binary files and thousand of other files just to install an application which is very complicated, this is where the package manager comes in. Every Linux distros has its own package manager at your disposal to help.

The Standard Linux package format is RPM, which is used in RedHat, Fedora, Mandriva and SUSE. Another popular package format is DEB, which is a Debian software package used in Debian Linux. The Distributions based on Debian Linux are Ubuntu, Knoppix and Mepis. The Debian package file normally has the extension as Application-name.deb

Note: To Install any Application in Linux, you need to become superuser.

 

Installing Application using Package in Ubuntu Manually

If you have already downloaded any software in the package format, i.e. .deb File which is present on your local drive or Cd Drive then follow the below steps to install the package on your system.

Step 1: Open Terminal, Press Ctrl + Alt +T.

Step 2: Navigate to the directories were you have saved the .deb package on your system. For example, here we have saved in the download folder of home directories.

Use “cd” command to navigate to directories and use “ls” command to list directories content.

type cd home/username/download

Installing Application using Package in Ubuntu Manually

Step 3: To install any software or making any modification on Linux require admin rights, which is here in Linux is SuperUser

type sudo su

Then type your Root password when prompted

Installing Application using Package in Ubuntu Manually

Step 4: Here, we are installing Foxit Reader software package on the system, which is present in the download folder of home directories. Using “ls” command will list directory content.

type sudo dpkg –i filename.deb

install package using dpkg

Foxit Reader Installed Successfully…

Here,

sudo – we prefix most command with sudo because it’s a command which specifies super user permissions.

dpkg – dpkg is a tool to install, build, remove and to manage packages and –i specifies to install .deb file.

 

Installing Application using Package in Ubuntu from Internet

If you have been using or learning Ubuntu for a while, you might have observed the command named apt or apt-get. As said earlier, Every Linux distros has its own package management system (containing software list). For Ubuntu, it’s Advanced Packaging Tool (APT). In Ubuntu, it has a list of repositories of the software package which are available and act as a database of all package sources. Installing software using APT is very easy, but you need the internet to download the files.

Searching a Software Package

To search for a software package, we use the below command. For example, here I am searching for flash player and VLC Media Player.

type apt-cache search flashplayer

search package in ubuntu using apt

Installing a Software Package

Once you know the name of the package you want to install, type the below command to install that package. Here, VLC in the below command is the package name.

Type apt-get install VLC

It may ask “Do you want to Continue”, type Y to Install.

Installing Application using Package in Ubuntu from Internet

 

Installing Application from tarball *.tar.gz files in Ubuntu

Other than normal package file like DEB and RPM, this types of files are also distributed. This type of format is a well-know format in Linux/Unix because, this files contains the source code for the software. The most Open-Source Software use tarball to distribute their software, tarball files have the extension as .tar.gz, tgz or tar.bz2

Since it’s a source code, You will need 3 command to run this software on the system

  1. ./configure
  2. make
  3. make install

Follow below steps to Install Software from tarball files.

Step 1: Uncompress tarball

Tar ball is a archive files which are usually compressed similar to ZIP files on windows or SIT files on Mac. To uncompress or to extract the content of tar ball, use below command.

Type tar –xzvf filename.tar.gz

 

Note: If the extension of tar.bz2 then use “j” in place of “z” i.e. tar -xjvf

Here,

x – To extract the files.

z – use gzip to zip or unzip files, used when its .gz files.

v – verbose the files list which are extracted.

f – following is the archive file name.

j – use to decompress .bz2 files.

Step 2: Build and install software.

Since it is a source code, we need to compile, build and install it on the system. Okay, that look very complicated but don’t worry it’s not going to be that hard. Navigate to the extracted folder using the cd command. Once you are in the directory, run “./configure” command, which will verify whether your system has all the necessary functionality and libraries which is required to compile the package. Once that’s done run “make” command, which will compile the source file into executable binaries. And finally, run “make install” which will install the package in the appropriate location.

./configure

make

make install

Note: Each tarball comes with an instruction or read me files, which mention some general information about the software and the installation procedure. This files are usually named as Install or README file.

Type vi Install

For more updates, Subscribe to Techie Inspire

About Kroshan

Roshan Karkera a.k.a. k.roshan. Blogger by passion and software engineer by profession. He believes in sharing knowledge, which made him to start his own blog. He is very much keen & passionate about new technology & Science. If you'd like to connect with him, follow at Google plus or Twitter.
  • Dr Freezed

    thank a lot
    you just saved me 

  • Raju

    hi friend, i am using redhat 5, i have a problem to install a third party softwares like open office, adobe reader. can you help me please.