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. …


This content originally appeared on DEV Community and was authored by Arbitrary

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.

cd /opt/

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.

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


This content originally appeared on DEV Community and was authored by Arbitrary


Print Share Comment Cite Upload Translate Updates
APA

Arbitrary | Sciencx (2021-12-19T06:04:10+00:00) How to install tarball (.tar) files in linux. Retrieved from https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/

MLA
" » How to install tarball (.tar) files in linux." Arbitrary | Sciencx - Sunday December 19, 2021, https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/
HARVARD
Arbitrary | Sciencx Sunday December 19, 2021 » How to install tarball (.tar) files in linux., viewed ,<https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/>
VANCOUVER
Arbitrary | Sciencx - » How to install tarball (.tar) files in linux. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/
CHICAGO
" » How to install tarball (.tar) files in linux." Arbitrary | Sciencx - Accessed . https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/
IEEE
" » How to install tarball (.tar) files in linux." Arbitrary | Sciencx [Online]. Available: https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/. [Accessed: ]
rf:citation
» How to install tarball (.tar) files in linux | Arbitrary | Sciencx | https://www.scien.cx/2021/12/19/how-to-install-tarball-tar-files-in-linux/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.