\section{The (Guest) Operating System} \subsection{Linux Overview} \begin{frame} \frametitle{Linux Overview} \begin{columns} \column{.5\textwidth} \begin{itemize} \item \justifying Though Cactus is cross-platform and may be developed in the developer's operating system of choice, Linux is the primary development environment. We will use a Linux environment for this tutorial. \end{itemize} \column{.5\textwidth} \centering \includegraphics[width=.5\textwidth]{tux.jpg} \end{columns} \begin{itemize} \item \justifying Linux was developed in 1991 by Linus Torvalds, after whom the operating system is named. The open-source philosophy underlying Linux inspires many software developers to license their software under the GPU (GNU Public License), allowing the software user access to the program source code as well as the right to modify and release forks of it. \end{itemize} \end{frame} \begin{frame} \frametitle{Distributions} \begin{itemize} \item For this reason, there are many varities of Linux called \textbf{distributions}. The major difference among distributions is often their package management system. The most popular distributions with original package management systems include: \end{itemize} \vspace{12pt} \begin{columns}[t] \column{.5\textwidth} \begin{center} \includegraphics[width=.2\textwidth]{slackware-logo} \\ \vspace{16pt} \includegraphics[width=.2\textwidth]{debian-logo} \end{center} \column{.5\textwidth} \begin{center} \vspace{-4pt} \includegraphics[width=.2\textwidth]{gentoo-logo} \\ \vspace{8pt} \includegraphics[width=.2\textwidth]{redhat-logo} \end{center} \end{columns} \end{frame} \begin{frame} \begin{columns} \column{.5\textwidth} \justifying Though Linux offers a feature-rich GUI with many options for desktop environments and window managers, it is nevertheless a command-driven system. \\ \vspace{78pt} \centering \includegraphics[width=.4\textwidth]{terminal-icon} \column{.5\textwidth} \begin{center} \includegraphics[width=18mm]{gnome-logo} \\ \includegraphics[width=12mm]{kde-logo} \hspace{12pt} \includegraphics[width=20mm]{xfce-logo} \end{center} \vspace{24pt} \justifying Linux has a mature command-line shell well-suited as a programming environment. One may write, compile, and debug programs from the CLI. \end{columns} \end{frame} \subsection{ETK-OS Features and Utilities} \begin{frame} \begin{itemize}[<+->] \item Our OS is a minimalist Debian-based operating system that contains all the features required for Cactus/ETK development: \begin{itemize} \item Eclipse/Mojave \item Cactus Computational Toolkit \item Einstein Toolkit \item Simfactory \end{itemize} \end{itemize} \begin{columns}[t] \column{.5\textwidth} \begin{itemize} \justifying \item Our OS uses a minimalist window manager called Fluxbox to ensure that it runs speedily inside of the virtual environment. \end{itemize} \begin{center} \includegraphics[width=30mm]{cactux.jpg} \end{center} \column{.5\textwidth} \begin{center} \includegraphics[width=30mm]{fluxbox-logo.png} \begin{itemize} \item We name our distribution ETK-OS. \item We offer ETK-OS as a virtual machine (VirtualBox) file and as a LiveCD. \end{itemize} \end{center} \end{columns} \end{frame} \subsection{ETK-OS LiveCD} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{itemize} \justifying \item To use the ETK-OS LiveCD, insert the CD into the DVD-ROM player and reboot the computer. \item Ensure that in your BIOS settings, the DVD-ROM takes priority over other bootable devices. \end{itemize} \begin{center} \includegraphics[width=40mm]{welcome} \end{center} \column{.5\textwidth} \begin{center} \includegraphics[width=30mm]{dvd-logo} \end{center} \begin{itemize} \justifying \item ETK-OS will then boot from the DVD. \item The username is `cactus'. \item The password is not set in the LiveCD environment, nor is it necessary; the user already has administrative permission. \end{itemize} \end{columns} \end{frame} \subsection{ETK-OS LiveCD: How It Works} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \justifying The DVD creates a special filesystem in RAM to which it performs all output operations. Thus all changes are written to RAM, not to the hard disk, and will be erased on reboot. \\ \vspace{36pt} \begin{center} \includegraphics[width=20mm]{hdd-icon} \end{center} \justifying Any files on the DVD, including its binaries, are read-only and cannot be changed. \\ \column{.5\textwidth} \begin{center} \centering \includegraphics[width=20mm]{ram-icon} \end{center} \justifying If a hard disk is attached to the machine, it may be mounted (made available to ETK-OS for I/O). Mounting a filesystem makes the root directory of that filesystem available as a subfolder from the root directory of the working filesystem. \\ \begin{center} \includegraphics[width=20mm]{cd-icon} \end{center} \end{columns} \end{frame} \section{Virtual Box} \begin{frame}{Virtualization} \begin{itemize} \item If you prefer to run ETK-OS within your working OS, you may use virtualization. \item \textbf{Virtualization} is the process of emulating one operating system within another. The emulated OS is called the \textbf{guest OS}; the OS in which the emulation is done is the \textbf{host OS}. \pause \item \textbf{Virtualization software} is required to achieve this end. \pause \item Examples of virtualization software packages include: \end{itemize} \begin{columns}[t] \column{.5\textwidth} \begin{center} \vspace{12pt} \includegraphics[width=30mm]{parallels-logo} \\ \vspace{18pt} \includegraphics[width=30mm]{vmware-logo} \end{center} \column{.5\textwidth} \begin{center} \includegraphics[width=30mm]{virtualbox-logo} \end{center} \end{columns} \end{frame} \begin{frame}{VirtualBox} \begin{columns}[t] \column{.5\textwidth} VirtualBox is: \begin{itemize} \item cost-free \item open-source \item cross-platform \item intuitive \item easily configurable \end{itemize} \column{.5\textwidth} \begin{center} \includegraphics[width=30mm]{virtualbox-logo} \end{center} \end{columns} \pause \vspace{12pt} Thus we choose it for our virtualization needs. In VirtualBox, the guest OS resides in a VBox machine file which is transferrable from one host OS to another. \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{itemize} \item \end{itemize} \column{.5\textwidth} \begin{center} \includegraphics[width=40mm]{new-vm} \end{center} \end{columns} \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{itemize} \item Call the system `ETK-OS'. \item It is a Debian-based Linux distribution. \end{itemize} \column{.5\textwidth} \begin{center} \includegraphics[width=40mm]{vm-type} \end{center} \end{columns} \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{itemize} \item Set the RAM equal to one-third to one-fourth of your total physical RAM. \item Setting the VM RAM too low may cause it to run out of available memory during the tutorial. \item However, setting it to high may cause it to slow down. VirtualBox requires RAM available to the host OS to support low-level processes which allow it to run. \end{itemize} \column{.5\textwidth} \begin{center} \includegraphics[width=40mm]{vm-ram} \end{center} \end{columns} \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{itemize} \item Use the .vdi file from the DVD-ROM. You'll want to copy the .vdi file onto your hard drive before selecting. \end{itemize} \column{.5\textwidth} \begin{center} \includegraphics[width=40mm]{vm-use} \end{center} \end{columns} \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} % \begin{itemize} % \end{itemize} \column{.5\textwidth} \begin{center} \includegraphics[width=40mm]{vm-finish} \end{center} \end{columns} \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \justifying In order to escape the VirtualBox environment, you may press the VirtualBox Host Key. By default it is Right Ctrl. Since you may have to use the Ctrl key within the Linux enviroment, you may wish to change the Host Key. Under the VirtualBox menu, click `Machine'. \begin{center} \includegraphics[width=40mm]{vm-hostkey.png} \end{center} \column{.5\textwidth} \begin{center} \includegraphics[width=40mm]{vm-prefs.png} \end{center} \justifying In the left-hand pane of the dialogue window that appears, click on `Input'. On the right-hand side, you may change the Host Key; simply click within the text window and hit the desired Host Key. \end{columns} \end{frame} \subsection{Command-Line Essentials} \begin{frame} \frametitle{The Terminal} \begin{itemize}[<+->] \item During the tutorial, we will use a command-line interface (terminal). \item On the desktop, click on the icon labelled `gterm'. \item A terminal window will appear. \end{itemize} \end{frame} \begin{frame} \frametitle{Essential Terminal Commands: Navigation and Files} \begin{tabular}{lll} pwd & present working directory & pwd \\ ls & list directory contents & ls [dir] \\ cd & change directory ('..' means up) & cd [dir] \\ cp & copy file/directory (-r) & cp [file/dir1] [file/dir2] \\ mv & move/rename file/directory & mv [file/dir1] [file/dir2] \\ rm & delete file/directory (-r) & rm [file/dir(s)] \\ \end{tabular} \end{frame} \begin{frame} \frametitle{Text File I/O} \begin{tabular}{lll} cat & print text file to screen & cat [file(s)] \\ head & print first n lines of file (default 10) & head -n [num] [file(s)] \\ tail & print last n lines of file (default 10) & tail -n [num] [file(s)] \\ nl & print text file to screen with line numbering & nl [file(s)] \\ less & print text file to screen, scrollable & less [file(s)] \\ \end{tabular} \end{frame} \begin{frame} \frametitle{Text File I/O} \begin{tabular}{lll} nano & simple, intuitive text editor & nano [file(s)] \\ vim & full-featured programming text editor & vim [file(s)] \\ \end{tabular}{lll} \begin{itemize} % Include a graphic with the direction map: h, j, k, l. \item To navigate vim/less: h, j, k, l. \item Use i to insert in vim, ESC to quit insert mode. \item Use Ctrl+X to save/quit nano, ZZ to save/quit vim, and q to quit less. \end{itemize} \end{frame} \begin{frame} \frametitle{Searching and Sorting} \begin{tabular}{lll} grep & find regex in a file & grep [regex] [file] \\ sort & sort the lines of a file & sort [file] \\ uniq & isolate unique lines in a file & uniq [file] \\ tac & print lines of file backwards & tac [file] \\ rev & print characters in lines backwards & rev [file] \\ \end{tabular} \end{frame} \begin{frame} \frametitle{Documentation} \begin{tabular}{lll} man & manual pages & man [command] \\ apropos & find commands & apropos [keyword] \\ \end{tabular} \end{frame}