Terminal in Mac?

Terminal is an application that runs commands given by user, actually there is a special program inside Terminal called Shell – which reads in commands and execute them on Mac OS operating system.Terminal’s only job is to open windows and manage shells, while shells actually do real work of Command Execution.

Terminal in Mac OS

How to open Terminal on Mac?

Terminal like any other program on Mac, can be found either using search bar in top right corner of mac screen or by searching it inside launchpad of Mac.

Opening Terminal – Search Bar in top right Corner of MAC Screen

Step 1

Step 2

Step 3

Opening Terminal – Searching it inside launchpad of Mac

Step 1

Step 2

What is Shell?

Shell is a program which runs inside Terminal. Whenever user enters any command into Terminal, then its executed by Shell Program. For example – When you enter Command ls -1 ~/Documents inside Terminal then shell program will take it as an input, interpret it and execute it, then print out output on Terminal window. There can be different types of Shell like Bourne Shell, Korn Shell, C Shell.
Most known of these is Bourne Shell, which is commonly known as bash.

What does Shell inside Terminal actually do?

  1. Displays a prompt message in Terminal Window and then waits for user to enter commands
  2. Shell reads user-entered command and interprets special symbols in it
  3. If command typed in Terminal needs to run some program, then shell will located it and then run it
  4. If command typed by user results in some output, then shell will take that output from MacOS Operating System and will print it on Terminal Window.

Below is a picture showing How Shell, Terminal are linked with each other and with MacOS Operating System.

Terminal - Window
Shell - Read Commands and Execute those

What are Terminal Commands?

Terminal Commands are specific instructions which can be given to Mac OS Operating. For example – pwd, cd ~, ls and many more. Just note that these commands are case-sensitive, so PWD will not work and pwd will work.

Some Common Terminal Commands

  • clear – Clears out all information on terminal screen
  • ls – Lists all of files in a directory
  • cd ~ – Return to home directory
  • mkdir – Make a new directory or folder

Similar to these, there are a lot of other Terminal Commands for doing cool stuff right from Terminal without navigating inside file system.

Gagan

Hi, there I'm founder of ComputerScienceHub(Started this to bring useful Computer Science information just at one place). Personally I've been doing JavaScript, Python development since 2015(Been long) - Worked upon couple of Web Development Projects, Did some Data Science stuff using Python. Nowadays primarily I work as Freelance JavaScript Developer(Web Developer) and on side-by-side managing team of Computer Science specialists at ComputerScienceHub.io

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts