![]() Wget is installed by default on many Linux distributions. This will download the archive to your machine. Note the version number might have changed by the time you read this. In your terminal, type in the following: wget Right click on the link, and select “copy link” ![]() In this case, you can see the latest Linux version on the front page. In this example, we will install the Go language runtime on our Linux Machine.įirst, browse to the Go Downloads Page and find the latest version. You can do this using the same techniques we just learned. Sometimes in Linux, you’ll want or need to install software from a tarball. Easy! How do we install software from tarballs? If you’re working with a gzipped tar (.tar.gz) you add the “z” flag to it: tar -xvzf ourfiles.tar -C myfolder/Īnd it performs the same function. We’ll tell it to extract to our new folder: tar -xvf ourfiles.tar -C myfolder/ Next, we’ll perform the same extraction, but we’ll add another parameter (-C) to specify where to extract it. What if we want to put them in a specific folder? We see our files again are extracted so we can access them. We have two tarballs here, one compressed and one uncompressed. Let’s delete the text files in the folder now. Once again, we see the files that were added listed here. ![]() To do this, we just add an argument to the tar command (z), and we change the file extension to. Great! This is a bundle of your files, uncompressed. You should then see the files that were added to your tarball.Īlso, if you type in ls -la again, you’ll see your new file: Type in this command: tar -cvf ourfiles.tar *.txt We have the tar command and add our arguments (-cvf), the name of the archive to create, and *.txt for all text files. Now, let’s create a tarball named ourfiles.tar. Type in ls -la to confirm they are in your directory: We’ll create four empty files: touch file1.txt file2.txt file3.txt file4.txt If they’re bundled and compressed, they’re named .Īnother extension you may see is filename.tgz, which is just shorthand for. When the files are uncompressed, they’re usually named something like filename.tar. You take a set of files and bundle them together, and compress them into a. What are tarballs? They’re a group of files bundled together in a single file. How do we install software from tarballs?.How do we extract files from a tarball?.Now we’re going to look at something that trips up many beginners: tarballs. In the last article in our series, Linux Commands You Need to know Part 2: Working with Files we learned how to work with files on our filesystem.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |