<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_definitions}
\input{common_latex/common_latex_help_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{Help Topic: Finding the Command Line Using the Terminal Application}
\vspace{0.1in}
\labdate{Spring 2020}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labline
\end{labcover}

\wikidoc{file=Help.OSXTerminal}
\wikidoc{auth=mikerb@mit.edu}

%===============================================================
\section*{Finding the Command Line Using the Terminal Application}
%====================================================================
\wikisec{grp=osx,helpid=04,file=Terminal,short=Find the Command Line}

This topic describes how to get started using the Mac Terminal
Application. Terminal provides a command-line interface to your system
which we will use extensively.  All Macs come with
Terminal pre-installed, but it is not one of the applications in your
Dock by default. This topic describes how to add it to your dock and
configure a few basic properties of Terminal.

%---------------------------------------------------------------
\subsection*{A Quick Note about the Finder Application on MacOS}

As perhaps a new Mac user, you may have noticed a distinct feature on
the Mac, going back to its very earliest days, is that the top-most
menu on your screen changes, depending on what application you are using.
Two things remain constant though:

\begin{packed_itemize}
\item The left-most item on the top menu bar is {\em always} the Apple
  icon which has a consistent set of pull-down menu options regardless
  of what application you are using. 
\item The next left-most item is the name of the current
  application. If you are using the Terminal app, it will say
  Terminal. If you are using Emacs, it will say Emacs, and so on.
\end{packed_itemize}

\vspace{0.1in}
\noindent
The Finder application is a core application on your Mac. Unlike most
other applications, it is always running. If you click anywhere on the
desktop, outside any other application window, you will essentially be
selecting the Finder application and you will notice the corresponding
change on the menu bar. (try it!)

\vspace{0.1in}
\noindent
The Finder application is essentially an alternate universe compared
to the command line environment. It provides a GUI based experience
for navigating your computer. It is wonderfully intuitive, but the
command line is infinitely more powerful. Nevertheless for some things
we will reference the Finder application.

%---------------------------------------------------------------
\subsection*{Getting Terminal to your Dock}

Open the \var{Applications} folder in Finder. You can do this with a
shortcut by hitting Command-Shift-A anywhere on your desktop (outside
an open application). The long way is to select the \var{Go} pull-down
menu in Finder and select \var{Applications}.

\begin{packed_itemize}[3]
\item In the \var{Applications} folder, scroll down to near the end,
  and look for a \var{Utilities} folder. Open it and scroll down and
  look for the \var{Terminal} application.

\item Drag and drop the \var{Terminal} icon to your dock.

\item Now you may launch \var{Terminal} from the dock whenever you
  want a command-line interface.
\end{packed_itemize}

%---------------------------------------------------------------
\subsection*{Hints on Opening New Terminal Windows}

Clicking on the \var{Terminal} icon in the dock will not open multiple
windows. This may seem a bit counter-intuitive to users new to
MacOS. Below are some ways to open a new window:

\begin{packed_itemize}[3]
\item When \var{Terminal} is the active application (it says
  \var{Terminal} next to the Apple icon in the upper left of your
  window), you can open a new window by pulling-down the \var{Shell}
  pull-down menu, and select \var{New Window}.

\item When \var{Terminal} is the active application, type the short-cut
  Command-n, to open a new window.

\item When \var{Terminal} is the active application, type the short-cut
  Command-t, to open a new terminal as a Tab in an existing window (I
  use this a lot!).

\item Control-click (or right-click, for two-button mouse users) the
  \var{Terminal} icon in the Dock. Select New Window.

\end{packed_itemize}

%---------------------------------------------------------------
\subsection*{Hints on the Configuring Terminal Application}

User preferences for \var{Terminal} may be set by selecting
\var{Settings} from the \var{Terminal} pull-down menu. We point
your attention to a couple things you may want to set:

\begin{packed_itemize}[3]
\item The \var{Terminal} preferences window has several tabs at the
  top. Select the \var{Profiles} tab. In the upper right there
  is a bar of buttons: \var{Text}, \var{Window}, \var{Tab}, \var{Shell}, and
  so on.

  \vspace{0.1in}
  Select the \var{Shell} button. 

  \vspace{0.1in}
  In the \var{Startup} section, check the box that says \var{Run command},
  and enter the command \var{bash}, as shown in Figure \ref{fig_term_config_shell} below.

\end{packed_itemize}

\vspace{0.1in}
\begin{figure}[H]
\centering
\includegraphics[width=0.65\textwidth]{figs_help/term_config_shell.png}
\caption{Setting the Shell to bash for the Terminal application.}
\label{fig_term_config_shell}
\end{figure}

\begin{packed_itemize}[3]
  
\item Under the Profiles tab, and the Window sub-tab, you can alter
  the default size of your window when it opens. Default is 80 columns
  and 24 rows. To change it, enter what you like in Columns and Rows
  fields as shown below.

\end{packed_itemize}
  
\vspace{0.1in}
\begin{figure}[H]
\centering
\includegraphics[width=0.65\textwidth]{figs_help/term_config_size.png}
\caption{Setting the Terminal size in terms of columns and rows.}
\label{fig_term_config_size}
\end{figure}


\begin{packed_itemize}[3]

\item Choose a background color that suits you. Very likely this will be
  the window/color your eyes will encounter the most in this and
  future labs.  I recommend tinkering to get it best suited for you.

\end{packed_itemize}

\noindent
{\bf Random Historical Mac Notes:}
    
\begin{packed_itemize}[3]

\item The Mac operating system is sometimes called \var{"MacOS"}, and sometimes
  called \var{"OSX"}. Apple used the latter for many years up until a few years
  ago before switching to the former. They mean the same thing.

\item On a Mac laptop, there is only the track pad. The "mouse-click"
  is done by clicking the track pad. The Mac laptop "mouse-click" can
  be configured to be a {\em tap} on the track pad instead of a full
  push-down click. See the track pad section under the System Settings
  menu. There is no physical right-click, but there is indeed a whole
  bunch of stuff that can be accessed with a right-click. To achieve a
  right-click, hold down the control button and perform a normal
  left-click. Try right-clicking on the Desktop background and see
  what happens. If you buy a mouse from Apple it only has one
  button. But you can certainly buy a two-button mouse from another
  vendor and both buttons will be respected.

\end{packed_itemize}




\end{document}

</pre></body></html>