I'm trying to upgrade Sublime Text editor in Mint 10 Linux, but they only have the tar.bz2 file available for download. Is there an easier way? I'm new to Linux, but I know you can install some programs with apt-get.
3 Answers
.tar.bz2
represents two different file extensions. .tar
is an extension that signifies a container. Originally, this container was a tape drive and tar was how you got data onto or off of it. It is similar to a .zip
file, but it does NOT COMPRESS the data. .bz2
DOES compress the data. .zip
is always available, but in Linux, .tar
is the standard. It concatenates the files together with basic metadata. .bz2
has better compression than .zip
files, anyhow. So, first .tar
is applied, then .bz2
.
Extracting it is as simple as this: tar xvjf filename.tar.bz2
The v
is optional, It just gives you visual feedback on what it's doing. The x
means you are telling it to extract data from the provided file. j
means the input file is in bz2
compression format and the f
means you are handling a file or device.
This is similar to doing bunzip2 filename.tar.bz2
followed by tar -xvf filename.tar
. However, the former leaves the filename.tar.bz2
file itself intact while the latter actually decompresses the .bz2
file into a .tar
file.
The CONTENTS of that file are what determines how the program itself is installed.
In the case of Sublime, it looks like it just contains the binaries of the program. Once extracted, it's ready to run. There are 2 options you can take to make this easily executable.
- Add the new path you created (or move Sublime to another folder) to your
$PATH
environment variable. This can be done like this towards the end of your.bash_profile
or.bashrc
:PATH=${PATH}:/path/to/sublime
Note: Replace the /path portion with the real path of Sublime on your PC - Create a symlink for the executable to a directory that already exists in your path, such as
/usr/local/bin
:ln -s /full/path/of/sublime.executable /usr/local/bin
If there are additional binaries with the install that must be executed, then option 2 will not be feasible.
I've been using webupd8's PPA for Sublime for over a year without any problems, check it out. It's much more convenient than playing around with tar balls and manual hacking and slashing.
On Mint 10 Linux I no idea, but in ubuntu you can add ppa, just search for google, sublime text will upgrade automatic
apt-get
, I assumed he used a Debian-based distribution with APT available.dpkg
, just checking assumptions... :)