shell
The program that reads the commands you type, runs them and shows the results; sh and bash are common ones.
In more detail
The shell also runs scripts, which are files of the same commands. It interprets special characters such as *, ! and &, so arguments containing them usually need quoting.
Examples
Quote host patterns such as 'production:!dbservers', because ! and & mean something to the shell.Distroless images contain no shell at all.Quote Git format strings so the shell passes them unchanged: git log --format='%h %s'The shell is an ordinary user space program: it parses your command line, expands variables and starts other programs as child processes. It also provides job control, letting you move commands between the foreground and background. The kernel only sees the processes the shell starts, not the command text you typed.sh -c 'printf "child finished\n"' asks the shell to start a short child process that prints and exits.Python's own interactive mode is also called a shell; its prompt is >>>.Office programs spawning shells is a classic malware indicator.Related terms
- shell script — A text file of shell commands that runs them in order, top to bottom, as if you had typed them one by one.
- shell module — The module that runs a command through the host's shell, so pipes, redirection and variables work, unlike the command module.
- command module — The module that runs any program you name on the host and reports what it printed, without being able to tell whether it changed anything.
- terminal — The text window where you type commands and read their output.
- Bash — The GNU shell: a program that reads commands, typed or from a script, and runs them.
- sh — The standard Unix shell name: whatever program /bin/sh points to, expected to behave as the POSIX standard describes.
- kernel — The core of an operating system that controls the hardware and decides what every program is allowed to do.
- run step — A workflow step whose run key holds shell commands for the runner to execute.
- AWS CLI — Amazon's command-line tool for calling AWS services from a terminal or script.
- environment variable — A named setting such as PORT=8000 that a program reads from its surroundings when it starts.
- exec form — Writing RUN, CMD or ENTRYPOINT as a JSON list such as ["python", "app.py"], so the program runs directly without a shell.
- SHELL — The Dockerfile instruction that changes which shell runs the shell form of later RUN, CMD and ENTRYPOINT instructions.
- interactive terminal — The -it flags that connect your keyboard to a container and give it a terminal, so you can use a shell inside it.
- minimal base image — A base image with as little inside as possible, such as Alpine, a slim variant or a distroless image, to shrink size and attack surface.
- pipe — The | operator, which connects one command's standard output to the next command's standard input so they run together.
- userland — Everything in an operating system except the kernel: the libraries, tools, shell and files programs use.
- child process — A process started by another process, its parent, from which it inherits a copy of the environment and current directory.
- job control — The shell feature for managing the commands it started: listing them with jobs, and moving them between foreground and background with fg and bg.
- Python shell — The interactive mode of the interpreter, where you type one statement at the >>> prompt and see the result straight away.
- zsh — An interactive shell close to bash in syntax, and the default login shell on macOS since Catalina (10.15).
- PowerShell — Microsoft's command-line shell and scripting language, built into Windows and also available on macOS and Linux.
- command injection — An attack where input meant as data, such as a file name or form field, gets run as commands because a program built code from it.
- shell metacharacter — A character with special meaning to a shell, such as ; & | $ ` or >, that can start a new command or redirect output.
Taught in
- What Configuration Management Is — Ansible Configuration Management at Scale
- Ansible Architecture And The Control Node — Ansible Configuration Management at Scale
- Installing Ansible — Ansible Configuration Management at Scale
- Your First Ad Hoc Command — Ansible Configuration Management at Scale
- The Static Inventory File — Ansible Configuration Management at Scale
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Playbook Syntax And YAML — Ansible Configuration Management at Scale
- Writing Your First Playbook — Ansible Configuration Management at Scale
- Modules And Idempotency — Ansible Configuration Management at Scale
- Conditionals — Ansible Configuration Management at Scale
- Performance, Forks And Best Practices — Ansible Configuration Management at Scale
- What A Shell Is, And What Bash Is — Bash Scripting & Command Line Automation
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- POSIX sh Versus Bash — Bash Scripting & Command Line Automation
- What Is a Pipeline? — Continuous Integration & Continuous Delivery Pipelines
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Container Images The Exam Way — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Jobs And CronJobs That Behave — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Debugging Applications In Kubernetes — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Observability: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Mock Exam: Sixteen Tasks Against The Clock — Certified Kubernetes Application Developer (CKAD) Exam Prep
- IAM as the Foundation — Cloud Infrastructure & Hyperscaler Architecture
- The Danger of Long-Lived Keys — Cloud Infrastructure & Hyperscaler Architecture
- Policy Simulation and Dry Runs — Cloud Infrastructure & Hyperscaler Architecture
- Security Groups and Firewalls — Cloud Infrastructure & Hyperscaler Architecture
- The Console versus the CLI — Cloud Infrastructure & Hyperscaler Architecture
- Shift-Left Security Principles & Automated Pipeline Gates — Cloud Security & DevSecOps Engineering
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Kubernetes NetworkPolicies & Microsegmentation — Cloud Security & DevSecOps Engineering
- Runtime Anomaly Detection with Falco & eBPF — Cloud Security & DevSecOps Engineering
- Policy-as-Code Architecture: OPA & Rego Syntax — Cloud Security & DevSecOps Engineering
- CloudTrail Logging, Integrity Validation & Athena — Cloud Security & DevSecOps Engineering
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Install Docker And Verify Your Environment — Docker Architecture & Production Containers
- Commands, Logs, Exec And Exit Codes — Docker Architecture & Production Containers
- RUN, SHELL And Efficient Layer Caching — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- CMD, ENTRYPOINT, USER And Process Signals — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Tags, Digests And Reproducible Image References — Docker Architecture & Production Containers
- Authenticate, Tag, Push And Pull From A Registry — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Ephemeral Filesystems And Named Volumes — Docker Architecture & Production Containers
- Bridge Networks, DNS And Container Communication — Docker Architecture & Production Containers
- Port Publishing, Localhost And Network Troubleshooting — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Development Overrides, Hot Reloading And Debuggers — Docker Architecture & Production Containers
- Integration Tests, Test Data And Compose Cleanup — Docker Architecture & Production Containers
- Build, Test And Promote The Same Image In CI — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering
- Installing Git, And Telling It Who You Are — Advanced Git Internals & Distributed Workflows
- A Repository Is A Folder With A Memory — Advanced Git Internals & Distributed Workflows
- Conventional Commits — Advanced Git Internals & Distributed Workflows
- What Go Is and Why It Matters — Concurrent Systems Programming with Go
- Installing the Go Toolchain — Concurrent Systems Programming with Go
- Your First Program and go run — Concurrent Systems Programming with Go
- Files and the os Package — Concurrent Systems Programming with Go
- Parsing Arguments with flag — Concurrent Systems Programming with Go
- Shipping in Scratch and Distroless Images — Concurrent Systems Programming with Go
- Exporting Results as JSON — Concurrent Systems Programming with Go
- Control Plane: etcd, API Server, Scheduler, Controllers — Kubernetes: Production-Grade Container Orchestration
- Worker Nodes: kubelet, Runtime, CNI And kube-proxy — Kubernetes: Production-Grade Container Orchestration
- Bootstrap A Local Cluster And Check Your Context — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: describe, Events And A First Smoke Test — Kubernetes: Production-Grade Container Orchestration
- Pods, Init Containers And Sidecars — Kubernetes: Production-Grade Container Orchestration
- DaemonSets And Node Services — Kubernetes: Production-Grade Container Orchestration
- Jobs And CronJobs — Kubernetes: Production-Grade Container Orchestration
- etcd Snapshots And A Tested Restore — Kubernetes: Production-Grade Container Orchestration
- What A Kernel Does, And What It Refuses To Do — Linux Fundamentals & Systems Administration
- Users, UIDs And The Password File — Linux Fundamentals & Systems Administration
- Job Control, And Processes That Outlive You — Linux Fundamentals & Systems Administration
- Child Processes: spawn, execFile, fork & IPC — Node.js Internals & Backend Services
- What Python Is, And Where It Came From — Hands-on Python: Complete Video Course & Book
- Editors, IDEs And Shells — Hands-on Python: Complete Video Course & Book
- Installing Python On Windows — Hands-on Python: Complete Video Course & Book
- Idle And The Python Shell — Hands-on Python: Complete Video Course & Book
- The Idle Editor And Running Programs — Hands-on Python: Complete Video Course & Book
- Alert Triage, False Positive Reduction & Fatigue Mitigation — Security Operations & Threat Hunting (SOC)
- Event Correlation Rules, Thresholds & Anomaly Pipelines — Security Operations & Threat Hunting (SOC)
- Detection as Code: Authoring & Testing Sigma Rules — Security Operations & Threat Hunting (SOC)
- Windows Event Logs, Sysmon & Linux Auditd Telemetry — Security Operations & Threat Hunting (SOC)
- Recovery & System Validation Testing — Security Operations & Threat Hunting (SOC)
- Memory Forensics: Process Trees & Injection — Security Operations & Threat Hunting (SOC)
- Injection In All Its Forms — Application Security & Threat Modeling for Engineers
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Static Application Security Testing — Application Security & Threat Modeling for Engineers
- Graded On A Machine You Never Touched — RHCE in Ansible (EX294): Automate Red Hat Systems
- Static Inventories: Hosts, Groups And Groups Of Groups — RHCE in Ansible (EX294): Automate Red Hat Systems
- SSH Keys And An Account For Ansible — RHCE in Ansible (EX294): Automate Red Hat Systems
- Deploying Files: file, copy, lineinfile And blockinfile — RHCE in Ansible (EX294): Automate Red Hat Systems
- Loops: One Task, Many Items — RHCE in Ansible (EX294): Automate Red Hat Systems
- Conditionals: register, when, changed_when And failed_when — RHCE in Ansible (EX294): Automate Red Hat Systems
- ansible-navigator: The Settings File The Exam Reads — RHCE in Ansible (EX294): Automate Red Hat Systems
- Finding Modules In Collections: ansible-doc And navigator — RHCE in Ansible (EX294): Automate Red Hat Systems
- Git And VS Code: Clone, Commit, Push, And The Dev Container — RHCE in Ansible (EX294): Automate Red Hat Systems
- Packages And Repositories: yum_repository And dnf — RHCE in Ansible (EX294): Automate Red Hat Systems
- Scheduling: cron Jobs With Names, And Timers — RHCE in Ansible (EX294): Automate Red Hat Systems
- Users And Groups From A List, With Passwords That Settle — RHCE in Ansible (EX294): Automate Red Hat Systems
- Ansible Vault: Secrets Encrypted, Runs Without A Prompt — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: A Web Node From A Ticket — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- bash(1) manual page
- Bash Reference Manual: What is a shell?
- POSIX Shell Command Language
- man7.org: sh(1p)
- Python on Unix: using Python