How to install tar files in linux

How to install tarball (.tar) files in linux

Does it happen to you that you that whenever you want to install a piece of software you’re give either a .deb file or a .tar file. Installing .deb files is easy, it’s just like how you do in windows, but .tar files are a pain specially for beginners.
In this simple tutorial we’ll learn how to download and install .tar file. I’ll use Ubuntu but it should work in most Linux distros. I’ll install *waterfox web browser * but the process is similar for all the tarball (.tar) installation files.

tldr;

  1. download the tar file
  2. extract it to some location
  3. create a desktop entry for running the application

Detailed method

Step 1 :download the .tar file and then move it to the directory where you want to install it.

After downloading the file open the terminal in current directory to move the file to /opt directory using the following command.
you can change the filename and target directory accordingly.

sudo mv waterfox-G4.0.5.en-US.linux-x86_64.tar.bz2 /opt 

Step 2: Extract the .tar file

first goto the directory where you moved the .tar file.

To extract the .tar file present in the current directory to use the following command

sudo tar xjf waterfox-G4.0.5.en-US.linux-x86_64.tar.bz2 

you can replace the .tar filename i.e. waterfox-G4.0.5.en-US.linux-x86_64.tar.bz2 as per your filename.

Step 3: Create desktop entry with appropriate permissions

make yourself owner of the extracted repository

sudo chown -R $USER /opt/waterfox 

Create a desktop entry so that you don’t need to come to this directory to launch the application.
run the following command

gedit ~/.local/share/applications/waterfox.desktop 

it’ll open gedit text editor where you need to insert the specifications of the desktop entry.
paste the following in the editor and save.

[Desktop Entry] Name=Waterfox Exec=/opt/waterfox/waterfox %u Terminal=false Icon=/opt/waterfox/browser/chrome/icons/default/default128.png Type=Application Categories=Application;Network;X-Developer; 

Again, change the various parameters and paths according to your setup.
The path can be directly under the first directory or inside bin directory, make sure you specify correct path.

Читайте также:  Logitech driving force gt linux

Desktop entry has many parameters but only a few are required but you should add at least these. You can read more at Desktop Entry Standard

Finally you need to make your desktop entry executable using the following command.

chmod +x ~/.local/share/applications/waterfox.desktop 

you can change the name of desktop entry accordingly.

finally you can remove the .tar file using the following command

sudo rm -rf waterfox*.tar.bz2 

Источник

How to Extract and Install .tar.gz Files in Linux

Linux is the operating system with more kinds of packages. If you have used Debian, you should know the file type .deb. If you have used Fedora, you should know the file type .rpm. In Linux we have many file types when we talk about installation packages and surely you’ll learn to install .tar.gz packages.

Table of contents

What is .tar.gz or .tgz?

​Tar isn’t an installation package but a computer software utility for collecting many files into one archive file. It is often referred to as a tarball for distribution or backup purposes. So .tar.gz is just a file format.Tar is often used together with a compression method, such as gzip, to create a compressed archive and file.tar.gz (or file.tgz).

Tarballs are often used to distribute the source code of an application or maybe a binary file to execute a program. You should consider finding an alternative before installing a tar.gz package because sometimes the process is longer and tougher.

How to install .tar.gz or .tgz file in Linux

If you need to install .tar.gz or .tgz package don’t worry, we have the solution.

Читайте также:  Display graphic card linux

extract tar.gz or tgz file in linux

I need to use WaoN because I play the guitar and want to transcribe the audio to a midi file, but WaoN isn’t available for my distro. So I have downloaded the source code to my computer, and the tarball’s content.

​To extract the files of a tarball, you can use the command: tar xvf tarball.tar.gz. Also, you should find more information about Tar here.

cd into the tar extracted directory

Now enter into the extracted directory:

​Commonly the tar.gz package contains a file with the instructions to compile and execute the program. My package contains a file called ‘INSTALL’ with the instructions:

read text file using cat command

​In other cases, you’ll find a ‘configure’ script. This script is a tool to check if your system has all the dependencies required for the building. If you find a ‘configure’ script, you must execute it: ./configure (also, you should check the file permissions).

install .tar.gz program in linux

If the output of the ‘configure’ script doesn’t report any problem, you can continue with the next step.

​To build a package, you must use the program make: make -arguments. More about make here.

Finally I get an executable file:

install executable file in linuxcompile tar.tgz package in linux

​Now I must execute my program. In most cases, you’ll install the program on your computer, so you must use the command ‘make install’. Other tarball packages contain a binary file, for example:

check and install .tar.gz file in linux

Sublime Text is available for Ubuntu, but it doesn’t provide a version for my distro, so I have to use the tarball version (the file type isn’t tgz, it’s a tar.bz2 file).

extract tar file in linux

​It takes the same process, extracts the file.

I found the executable file of sublime text, but I checked the file permissions to execute the file. If your file doesn’t have permissions, you can modify the permissions using chmod

sublime text editor in linux

​Finally execute the program. There are many possibilities when you install .tar.gz package. So you must analyze your situation and install your package. It’s easy, pay attention to your package.

Читайте также:  Android x86 linux apps

When you use the ./configure command, it will prompt you to install any dependencies. That is all there is to installing .tar.gz or .tgz files in Linux. If you have any problems installing packages using this method please let me know in the comments section below.

Источник

how to install .tar.xz file in ubuntu

i am new in Linux. Generally i install software by internet, but i think it is not a good approach to depend on internet all the times. Then i downloaded a vlc .tar.xz file. then searched Internet how to install .tar.xz. But unable to install. The command i written and result got given below..

ubuntu@ubuntu-HP:~/programs$ tar -zxvf vlc-2.0.6.tar.xz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now ubuntu@ubuntu-HP:~/programs$ tar -zxf vlc-2.0.6.tar.xz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now 

If you are new to linux, you may not be aware that you will generally want to install applications from the repositories, which are packaged and ready to install. Go to the Software Center in the menu, search and install it from there. If you don’t then please edit the question to explain why, as there are often better options than trying to install an app in the way you describe.

@paul, i installed software form there many times, but now i think i should know the way how to install without software center

@BlackSwan Well, you maybe should be able to do so but one cannot recommend to do that. Always prefer repo-packages. Anyway, how to «install»?: Just extract the files, compile them if needed (instructions should be in README or similar files) and copy them somewhere handy. For a system-wide installation to /usr/bin the binaries etc., but you might need to reconfigure the program to use /usr/lib as library-path etc. Instead of copying, make install might just work fine.

Источник

Оцените статью
Adblock
detector