OPS245 Lab 2

From Littlesvr Wiki
Revision as of 22:28, 17 January 2023 by Andrew (talk | contribs)
Jump to navigation Jump to search

!!! THIS LAB IS NOT READY YET !!!

Most of the software you'll ever install on a Linux server is open source (free to distribute and modify). In just about every Linux distribution you can use a package manager application to download the software from the internet and install it with a single command. Debian's package management system is caled Apt. Linux Mint uses the same system, since the distribution is built on top of Debian.

One reason a package manager makes it easy to install software is its dependency tracking and resolution ability. Most software requires some other software to run, and the other software probably requires some other software itself, etc. When you ask a package manager to install a piece of software - it will also install all the required dependencies.

Graphical Installer

Linux Mint comes with a graphical application called Software Manager, and another called Synaptic. Synaptic is also available on graphicall installations of Debian. We'll use Synaptic.

  • Look through the Menu (in the bottom left corner) on your workstation. Notice that the only browser you have installed is Firefox.
  • Start Synaptic from the Menu.
  • Put in your regular user's password. You need to be root to install software on the system, but your regular user has sudo privileges, and Synaptic will use that to install the package.
  • Click Reload. This will download the latest list of available software.
  • Look for Chromium and mark it for installation.
InstallChromium.png

Notice that it will tell you that an extra package needs to be installed. Chromium actually has many more dependencies, but the rest of them were already installed (you'll see the list during the next step). libgl1-mesa-glx is the only dependency missing.

  • Click Apply, and Apply in the window that pops up.

Synaptic will use the Apt system to figure out the names of the files to be downloaded and their locations on the servers, will download them, and install them.

InstallChromium2.png
  • After it's installed: right-click on the same chromium package in Synaptic, pick Properties, and Installed Files. Look through the list.
ChromiumInstalledFiles.png

Notice that this is quite different from Windows. In Windows typically all the files that are part of the application go into a folder in C:\Program Files\Whatever. In Linux the location of each file depends primarily not on the application it's part of but on the type of file it is.

System Directories

The system directory structure on Linux has a very long history on Linux, and it's based on Unix, which also has a long history. Which means that it's a bit of a mess. We'll look at the most common ones.

Executables

An application is almost always made of many files, but often only one or a handful of them are executables (the equivalent of an .exe file on Windows).

  • Run ls -l in your / directory in a terminal. Note that /bin is a symbolic link pointing to /usr/bin; and /sbin points to /usr/sbin. Historically the bin directory contained binaries that anyone could execute; and sbin was only for the administrator. These days with the common use of sudo: all users have both directories in their path.
  • Run echo $PATH to see which directories are checked when you run a command.
  • Use ls -l to see what files are in the /usr/bin and the /usr/sbin directories. Combine that with the wc -l command to count how many files are in there.