2018-11-09 13:06:37 +00:00
|
|
|
---
|
|
|
|
layout: page
|
2018-11-11 11:00:42 +00:00
|
|
|
category_title: Basic commands
|
|
|
|
category-page: basic
|
|
|
|
tags: Open the Shell
|
|
|
|
author: Gianmarco De Vita
|
2018-11-09 13:06:37 +00:00
|
|
|
title: Open the Shell
|
2018-11-11 11:00:42 +00:00
|
|
|
next-page: pages/cmd/basic/ls.html
|
2018-11-09 13:06:37 +00:00
|
|
|
---
|
|
|
|
<p>The tool that allows us to interact with the system with the shell is the terminal.
|
|
|
|
There are mainly two ways to access to the terminal on a MacOS system.</p>
|
|
|
|
|
|
|
|
<h3>Through the Finder</h3>
|
|
|
|
<ol>
|
|
|
|
<li>Open a new <i>Finder</i> window by clicking on the icon on the system dock.</li>
|
|
|
|
<img src="" alt="Open Finder" height="">
|
|
|
|
<li>On the menu bar, click on <i>Go</i>.</li>
|
|
|
|
<img src="" alt="Click on Go" height="">
|
|
|
|
<li>Click on <i>Utilities</i>.</li>
|
|
|
|
<img src="" alt="Click on Utilities" height="">
|
|
|
|
<li>Look for <i>Terminal</i> and click on it.</li>
|
|
|
|
<img src="" alt="Open Terminal" height="">
|
|
|
|
</ol>
|
|
|
|
<h3>Through <i>Spotlight</i></h3>
|
|
|
|
<ol>
|
|
|
|
<li>You can use the shortcut <code>cmd+space</code> to access to <i>Spotlight</i>.</li>
|
|
|
|
<img src="" alt="Access to Spotlight" height="">
|
|
|
|
<li>Then search for <i>Terminal</i>.</li>
|
|
|
|
<img src="" alt="Search Terminal" height="">
|
|
|
|
<li>Click on the <i>Terminal</i> icon displayed as result.</li>
|
|
|
|
<img src="" alt="Open Terminal" height="">
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
<p>As you open the Terminal, a new blank window opens: </p>
|
|
|
|
|
|
|
|
<img src="" alt="Terminal Blank Window" height="">
|
|
|
|
|
|
|
|
<p> You can notice that the top lines in the window follow this structure:</p>
|
|
|
|
|
2018-11-11 11:00:42 +00:00
|
|
|
<pre>
|
2018-11-09 13:06:37 +00:00
|
|
|
Last login: Day Month 2 hh:mm:ss on console
|
|
|
|
Device-name:~ username$
|
2018-11-11 11:00:42 +00:00
|
|
|
</pre>
|
2018-11-09 13:06:37 +00:00
|
|
|
|
|
|
|
<p>The tilde (~) just before your username means that the current position in
|
|
|
|
which the terminal is working is the Home directory. The gray spot next to
|
|
|
|
the symbol $ after your username indicates that you can write instructions
|
|
|
|
in that space.</p>
|
|
|
|
|
|
|
|
<p>Now, you are ready to try and use some simple commands
|
|
|
|
to familiarize with this interface.</p>
|
|
|
|
|
|
|
|
<p>Notice that you can work simultaneously on multiple sessions of the Terminal.
|
|
|
|
Just by pushing <code>cmd+T</code>, a new blank window will open without closing the current.</p>
|