As Caliga says, files ending in .tar.* are often source code. They are compressed tar archives, tar is a way to combine files end-to-end, which gets better compression than something like .zip, but with similar goals.
Some programs provide ‘standalone’, or ‘portable’, versions for linux, which are distributed via .tar.gz or similar. In these cases, make sure you can trust the source!!! It’s fairly rare for malicious code to be included in source code downloads, since at least a portion of the people who grab them (like me) will audit the code before compiling. For portable binaries, all bets are off.
That said, there will usually be an executable inside the tarball (it’s generally a good idea to unpack them in a sub-folder, in case there is no folder structure in the tarball, to keep it from making a mess). Sequence goes something like
cd $HOME
mkdir some_program_name
cd some_program_name
unp $HOME/Downloads/some_program.tar.bz2
ls
Note that unp is a handy auto-unpacker, it’ll figure out what format a compressed file is, and call the appropriate unpacker for you. It’d dumb, it unpacks the archive in the current directory, no matter what.
Anyway, that will spit out the list of files. There are a few common tricks for identifying the program. Anything that shows up green is marked executable, look for things like ProgramName, ProgramName.sh, run, and similar. Some packages tuck the program away inside of bin, something like bin/program_name or bin/x64/program_name.
As for compiling from source, it’s really not a big deal. You need the build-deps, which are different from the runtime deps. For starters, you’ll usually need gcc and build-essential, often the project providing the source will have a list of additional debian libraries, sometimes on the website, sometimes in a file in the source tarball. Once they are installed, you have to identify the build system in use. 15 years ago it was usually the gnu autotools, but cmake is quite common these days. If there is a file called configure, the sequence is some variation of
./configure && make && make install
Note that ./configure --help
is good reading
For cmake it’s something like
mkdir build && cd build && cmake .. && make && make install
Note that the make install
in both cases usually needs root access (sudo
).
In any case, if you have specific programs that are troubling you, you’ll need to specify which for any of us to give more than general advice.