Terminal and Command-line

Overview

  • Time: 15 min

  1. Learn how to use SSH for secure remote access.

  2. Understand the basics of SSH keys for authentication.

Terminal

A terminal is a text-based interface that lets users interact with the operating system by typing commands.

Terminal Interfaces Across OS

OS

Terminal App

Default Shell

Linux

gnome-terminal, xterm, etc.

Bash / Zsh / Fish

macOS

Terminal

Zsh (or Bash)

Windows

Command Prompt / PowerShell / Windows Terminal

cmd / PowerShell / Bash (via WSL)

Shell

A shell is a program that runs inside the terminal. It takes your commands, interprets them, and executes them.

Common Shells

Shell

Description

Bash

Bourne Again SHell, widely used in Linux and macOS.

Zsh

Z Shell, an extended version of Bash with additional features.

Fish

Friendly Interactive SHell, known for its user-friendly features.

PowerShell

A task automation and configuration management framework from Microsoft.

Explanation

  • What it is: A terminal is a program that displays a text-based interface to the user.

  • What it does: It allows you to type commands and see their output, enabling interaction with the operating system.

  • Analogy: Like a TV screen where you can see the content, but it doesn’t process the information itself.

Explanation

  • What it is: A shell is a program that interprets the commands you type in the terminal.

  • What it does: It processes your commands, executes them, and returns the results to the terminal.

  • Analogy: Like the set-top box behind the screen—it does the actual processing.

Key Points

  1. A terminal is a text-based interface for interacting with the operating system.

  2. A shell is a program that interprets and executes commands typed in the terminal.

  3. Common shells include Bash, Zsh, Fish, and PowerShell, each with unique features and capabilities.