Skip to main content
Engineering LibreTexts

11-E.5: Other Software Sources

  • Page ID
    41980
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    EXAM OBJECTIVES COVERED
    2.1 Given a scenario, conduct software installations, configurations, updates, and removals.

    Favorite App Sites

    As Linux grows in popularity, the number of open source apps increases as well. While it was not so long ago that Linux was still a bit of an oddity in the computing world, it has now grown to such significant numbers that not only is the open source world porting apps to Linux, but the commercial app developers are also making versions of their software available to Linux users.

    Some of the more popular apps can be found by a simple web search:

    • gimp - offers almost every type of tool you will ever require to manipulate an image, scale it, crop it, or simply add a layer to it.
    • Audacity - the most popular tool for basic audio editing tasks.
    • OBS - a pretty popular and robust screen recorder app.
    • VLC - a pretty simple media player that’s open-source and free as well.
    • Virtualbox - an amazing free and open-source virtualization solution for those who want to try different distros (or experiment with stuff) without affecting your host system.

    There is a lot of software available, and sometimes you have to search for it.

    The wget and curl Commands

    wget is the non-interactive network downloader, which is used to download files from the server even when the user has not logged on to the system. It can work in the background without hindering the current process. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. wget is non-interactive, meaning that it can work in the background, while the user is not logged on. This allows you to start a retrieval and disconnect from the system, letting wget finish the work. wget can follow links in HTML and XHTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is sometimes referred to as recursive downloading. While doing that, wget respects the Robot Exclusion Standard (/robots.txt). wget can be instructed to convert the links in downloaded HTML files to the local files for offline viewing.

    curl is a command line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP or FILE). curl is powered by Libcurl. This tool is preferred for automation, since it is designed to work without user interaction. curl can transfer multiple files at once.

    These two tools both accomplish the same tasks, although there are differences:

    • wget is recursive, meaning it can follow web page links and download subdirectories.
    • wget is a command line only tool. curl is actually implemented as a cross-platform library with a stable API.
    • curl supports more protocols than wget.

    The tar Command

    tar stands for 'tape archive' and is used to create/extract archive files. The tar command is one of the important commands which provides archiving functionality in Linux. We can use Linux tar command to create compressed or uncompressed archive files as well as maintain and modify them. An archive file is a file that is composed of one or more files along with metadata. Archive files are used to collect multiple data files together into a single file for easier portability and storage, or simply to compress files to use less storage space.

    Syntax:

    tar [ OPTIONS ] [ ARCHIVE-FILE-NAME ] [ file or directory to be archived ]

    The options for tar are:

    Options Option Meaning
    -c Creates archive
    -x Extracts the archive
    -f Creates archive with given filename
    -t Displays or lists files in archived file
    -u Archives and adds to an existing archive file
    -v Displays verbose information
    -A Concatenates the archive files
    -z Zip, tells tar command that creates tar file using gzip
    -j Filter archive tar file using tbzip
    -W Verify an archive file
    -r Update or add file or directory in already existed .tar file

    We can create an archive file using the c option (when using tar options we are NOT required to use a '-' in front of the option). So in the following command the options are c=create, v=verbose, and f=file to create which is exes.tar, and the files to include in that archive file are xya.cpp and xyz.cpp.

    pbmac@pbmac-server $ tar cvf exes.tar xya.cpp xyz.cpp
    xya.cpp
    xyz.cpp
    
    Then to list the contents of the file, use the t option
    pbmac@pbmac-server $ tar tvf exes.tar 
    -rw-rw-r-- pbmac/pbmac     105 2019-09-19 20:58 xya.cpp
    -rw-rw-r-- pbmac/pbmac     628 2020-09-24 20:21 xyz.cpp
    
    To extract the files from the archive the extract optoin 'x' is used
    pbmac@pbmac-server $ tar xvf exes.tar 
    xya.cpp
    xyz.cpp
    

    The gzip Command

    The gzip command compresses files. Each individual file is compressed and added to the resulting file that is named the same as the original file with a .gz extension. The compressed file consists of a GNU zip header and compressed data.

    If given a file as an argument, gzip compresses the file, adds a “.gz” suffix, and deletes the original file. With no arguments, gzip compresses the standard input and writes the compressed file to standard output. This is similar to the zip utility, but the two commands use different compression algorithms.

    Notice, in the following example, the xyz.cpp file no longer exists; it was compressed, and the uncompressed file is now gone.

    pbmac@pbmac-server $ gzip xya.cpp 
    pbmac@pbmac-server $ ls xya*
    xya.cpp.gz
    

    Also, it is possible to use a gzip option with the tar command. In the following example the z option is included and the output file has a .gz extension added onto it. We can see that the two files are different using the file command.

    pbmac@pbmac-server $ tar czvf exes.tar.gz xya.cpp xyz.cpp
    xya.cpp
    xyz.cpp
    pbmac@pbmac-server $ ls exes*
    exes.tar  exes.tar.gz
    pbmac@pbmac-server $ file exes.tar*
    exes.tar:    POSIX tar archive (GNU)
    exes.tar.gz: gzip compressed data, last modified: Mon Oct 26 21:10:53 2020, from Unix
    

    Adapted from:
    "tar command in Linux with examples" by Akansh Gupta, Geeks for Geeks is licensed under CC BY-SA 4.0
    "Gzip Command in Linux" by Shubrodeep Banerje, Geeks for Geeks is licensed under CC BY-SA 4.0


    This page titled 11-E.5: Other Software Sources is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Patrick McClanahan.

    • Was this article helpful?