Install That Tarball in Ubuntu

Installing applications was, for a much longer time than I care to admit, the most frustrating thing about Linux. My confusion and sense of helplessness was caused by, among other things, some sources providing a ppa with which to download and install via the command line and others providing a tarball (tar) which is not, say, the Linux equivalent of an img or exe installer. A tarball is a compressed archive–like a ZIP file–so whatever is inside isn’t going to install anything either.

The contents could be:

  • Source code you need to compile (if you’re single and bored)
  • Compiled code ready-to-go (if you have a boyfriend or girlfriend and things to do)

Fortunately, I recently learned about the Linux file hierarchy, which made my recent Firefox Developer Edition installation less scary than previous installations because I wasn’t confused by different instructions from various sources.

I like knowing what all that gibberish I’m typing into the Terminal means so, although there’s only two lines here, if you’re like me in that sense, I’ll explain the gibberish and any variables.

Note: It doesn’t matter where you download the tarball. You can move the tarball and anything you extract. Also, you’ll delete the tarball like any other ZIP or installer once you’re finished with it.

The following example code is for a tarball named firefoxdeveloperedition.tar.bz2 I downloaded to my desktop.

Step #1

To extract the contents:

tar -jxvf firefoxdeveloperedition.tar.bz2

tar is the utility you’re using so it’s the basic “command.”

You’ve probably seen a hyphen and a letter or two (or four) after a command. Each letter is an option–like checkboxes in a dialog box (the dialogue box itself being the GUI equivalent of a command in the terminal). You can specify multiple options simultaneously–hence multiple letters after the hyphen.

j == use bzip2 to decompress this tarball. We know to use j because of the final bz2 extension in the file name.

x == we want to extract the contents (there are other things we can do with the tar utility besides extracting)

v == “verbose” is optional. Verbose makes all those lines of code fly by telling us what’s happening during the whole process. If you don’t care about or need those details, you can omit v.

f == use the file I’m about to specify.

The result of this command is a folder named (in this case) “firefox” on my desktop.

Step #2

Move the “firefox” folder from my desktop (which lives in the home directory) to its proper home: the opt directory in the root directory. I’ll explain why /opt/ is the proper home in a future post very soon. Also, I want to differentiate this app from the regular Firefox by renaming the folder from “firefox” to “firefox-dev.”

sudo mv ~/Desktop/firefox /opt/firefox-dev

sudo == If I try using the mv command without authorization, the terminal responds, “permission denied.” If I give it the “superuser do” heads-up, it asks me for my password.

mv == “move” which then takes two parameters: the place of departure and the destination.

Just in case you can’t tell, there’s a space between ~/Desktop/firefox and /opt/firefox-dev.

~/Desktop/firefox is the current/original location and the item we want moved. The tilde and slash “~/” represents the “home” directory (likely your username) containing folders like Desktop, Downloads, Documents, and so on. firefox is the name of the folder we’re moving.

/opt/firefox-dev is the destination. The slash all by itself represents the root directory followed by the opt folder inside the root directory. We can change the name of the firefox folder to firefox-dev just by typing it that way.

Step #3

Delete that tarball (wrapping paper) and play with your new toy.

App didn’t come with a launcher? Create a Launcher in Ubuntu


About jotascript

Aiming to please. Seeking to impress.
This entry was posted in Linux, Ubuntu. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s