|$ curl https://forge-ai.dev/api/markdown?path=docs/os/shells
$cat docs/shells.md
updated Recently·18 min read·published

Shells

OSShellsBashZshBeginner🎯Free Tools
Introduction

A shell is a command interpreter. A terminal is the application that displays the shell. You type commands in a way humans understand; the shell translates those commands into instructions for the computer.

Shell vs Terminal
ComponentRoleExamples
TerminalGUI/TTY that renders textWindows Terminal, iTerm2, GNOME Terminal
ShellCommand interpreterBash, Zsh, Fish, PowerShell
KernelExecutes system callsLinux, Windows NT, Darwin
Common Shells

Bash is the default on most Linux systems and is the safest choice for scripts. Zsh is the default on macOS and offers better completion and plugin ecosystems like Oh My Zsh. Fish has excellent defaults and syntax highlighting but is not POSIX-compatible.

shells.sh
Bash
1# Check your shell
2echo $SHELL
3
4# List available shells
5cat /etc/shells
6
7# Change default shell
8chsh -s /bin/zsh
Customization
prompt.sh
Bash
1# ~/.bashrc or ~/.zshrc
2export PS1="\u@\h:\W\$ "
3
4# Add aliases
5alias ll="ls -la"
6alias gs="git status"
7
8# Add to PATH
9export PATH="$HOME/.local/bin:$PATH"

info

Use a plugin manager like Oh My Zsh or Starship to get a polished prompt with git status, timings, and language versions with minimal configuration.
Scripts

For portable scripts, target Bash and use #!/usr/bin/env bash. For cross-platform tools, consider Python or Node.js instead.