Linux: Compiling and Installing Source Code from the Terminal

From BS Wiki
Revision as of 17:29, 9 May 2021 by Bs (talk | contribs) (Created page with "== Compiling and Installing Source Code in Ubuntu == # Acquire the source code, and untar it if need be. See #:::<code>sudo gedit /etc/apt/sources.list</code> #::An example...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Compiling and Installing Source Code in Ubuntu

  1. Acquire the source code, and untar it if need be. See


  1. sudo gedit /etc/apt/sources.list
    An example line might look like this:
    deb-src http://us.archive.ubuntu.com/ubuntu/ hirsute main restricted
  2. Update the new package information that was added in step 1
    sudo apt-get update
  3. Navigate to the directory that the source code will reside in, and download it.
    Example for downloading the source code for the grep utility
    sudo apt-get source grep
    Example for downloading the source code for bash
    sudo apt-get source bash
  4. There should be a directory with the source code along with some other files. Move to the new directory to view the downloaded source code.

See Linux: Compiling and Installing Source Code for compiling and installing.