All questions
of 32What is the difference between a shell and a terminal?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A terminal is a program that provides a text-based interface to interact with the system, while a shell is the command-line interpreter that processes and executes commands entered in the terminal.
The terminal handles input/output display, while the shell interprets commands, manages environment variables, handles job control, and executes programs. Common shells include Bash, Zsh, Fish, and Dash.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
How do you make a shell script executable?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Use the chmod command to add execute permissions:
chmod +x script.sh
# Or using octal notation
chmod 755 script.sh
You also need to include a shebang line at the top of the script:
#!/bin/bash
# or
#!/usr/bin/env bash
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What is the purpose of the shebang (#!) line?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The shebang tells the system which interpreter to use when executing the script. It must be the first line of the script and starts with #! followed by the path to the interpreter.
#!/bin/bash # Use bash shell
#!/usr/bin/env bash # Use bash from PATH (more portable)
#!/bin/zsh # Use zsh shell
#!/usr/bin/env python3 # Use Python 3
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
How do you declare and use variables in bash?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Variables are declared without spaces around the equals sign and accessed with the $ symbol:
# Declaration
name="John"
age=25
# Usage
echo "Name: $name, Age: $age"
echo "Name: ${name}, Age: ${age}" # Preferred syntax
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
What's the difference between single quotes, double quotes, and backticks?
How do you pass arguments to a shell script?
What are exit codes and how do you use them?
How do you redirect standard output and standard error?
Explain the difference between `$@` and `$*`
How do you implement conditional statements in bash?
What's the difference between `[` and `[[` in bash?
How do you create and use arrays in bash?
Explain different types of loops in bash
How do you define and call functions in bash?
What are pipes and how do you use them?
How do you handle errors in shell scripts?
What is command substitution and how do you use it?
How do you process command-line options in bash?
Explain parameter expansion and its advanced features
How do you implement signal handling in bash scripts?
What are file descriptors and how do you manipulate them?
How do you implement process synchronization in bash?
Explain process substitution and its use cases
How do you implement a robust logging system in bash?
How do you implement parallel processing in bash?
What are coprocesses and how do you use them?
How do you implement dynamic variable names and indirect references?
How do you implement complex regular expressions in bash?
How do you implement error recovery and retry mechanisms?
How do you implement performance profiling in bash scripts?
How do you implement secure scripting practices?
How do you debug complex bash scripts effectively?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Shell Scripting (Bash/Zsh) cheatsheet
Shell Scripting for System Administration - Interview Cheat Sheet
- Summary01
- Shell Basics02
- Variables03
- Operators04
- Control Structures05
- Functions06
- Input/Output07
- File Operations08
- Process Management09
- Text Processing10
- System Administration11
- Advanced Topics12
- + 3 more inside
28 of 32 Shell Scripting (Bash/Zsh) answers are gated.
Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.
- Full answers + code
- AI explain - simpler, deeper, or visualized
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsLAMP
Linux, Apache, MySQL, PHPRuby on Rails
Convention over ConfigurationJAM
JavaScript, APIs, and MarkupServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQFastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseWeb3 / Ethereum
Solidity, Ethereum, Hardhat, FoundryDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.