-
Prompt: The text displayed to indicate that the shell is ready to receive user input.
-
Command: A program or built-in functionality that the shell can execute.
-
Argument: Additional information provided to a command that modifies its behavior or specifies inputs.
-
Shell variables: Variables that store values used within the shell environment.
-
Environment variables: Global variables that store system information and configuration.
-
Built-in commands: Commands that are implemented within the shell itself, rather than being external programs.
-
Path: A list of directories where the shell looks for executable programs.
-
Background execution: Running a command asynchronously, allowing the shell to continue accepting input and executing other commands.
-
Job control: The ability to manage and manipulate multiple running processes within the shell.
-
Wildcards: Special characters that represent patterns used for matching filenames or commands.
-
Subshell: A separate instance of the shell, typically created to execute commands within a script or a command substitution.
-
Signal: A software interrupt delivered to a process, used for various purposes such as terminating or suspending a process.
-
Pipeline: Connecting multiple commands together, where the output of one command serves as the input of the next.
-
Background/Foreground process: Background processes are executed independently, while foreground processes require user interaction and suspend the shell.
-
Exit status: A value returned by a command that indicates the success or failure of its execution.
-
Shell script: A file containing a sequence of shell commands and instructions that can be executed by the shell.
-
Aliases: Shortcuts or alternate names for commands or command sequences.
-
Job control signals: Signals used to manage and control running processes, such as sending them to the background or bringing them to the foreground.
-
Command substitution: A feature that allows the output of a command to be used as part of another command or assigned to a variable.
-
Interactive mode: A mode in which the shell accepts input directly from the user and provides immediate feedback.
-
Batch mode: A mode in which the shell reads commands from a file or a script and executes them without user interaction.
-
Shell options: Settings that control the behavior and features of the shell, such as enabling or disabling specific functionalities.
-
Signal handling: The process of defining how the shell should respond to various signals received from the operating system or user.
-
Standard input (stdin): The default input source for a command, typically connected to the keyboard.
-
Standard output (stdout): The default output destination for a command, typically connected to the terminal.
-
Standard error (stderr): The default error output destination for a command, typically connected to the terminal.
-
Background/Foreground job management: Controlling and manipulating background and foreground processes, including starting, stopping, and managing their execution.
-
Command history: A feature that allows the shell to store a list of previously executed commands, typically accessible through keyboard shortcuts or command history functions.
-
Shell initialization files: Files read and executed by the shell at startup, allowing the customization of shell settings and defining environment variables.
-
Command-line editing: Techniques and shortcuts for editing and manipulating the command line input before executing it.
-
Termination and exit: The process of ending the shell's execution, either by user command or upon completion of all tasks.
-
Quoting and escaping: Techniques for specifying literal values, preventing interpretation of special characters, and preserving whitespace within commands and arguments.
-
Job scheduling: The ability to schedule commands or scripts to run at specified times or intervals.
-
File globbing: Pattern matching technique used to expand wildcard characters in filenames.
-
Input/output redirection: The process of changing the default sources or destinations of input and output for a command.
system call
Syntax: command1 && command2 Meaning: Execute command1 and if it succeeds (returns an exit status of 0), then execute command2. Behavior:
- If command1 succeeds (returns exit status 0), command2 is executed.
- If command1 fails (returns a non-zero exit status), command2 is not executed.
Example: Only remove the file if it exists and the removal is successful rm file.txt && echo "File removed"
Syntax: command1 || command2 Meaning: Execute command1 and if it fails (returns a non-zero exit status), then execute command2. Behavior:
- If command1 succeeds (returns exit status 0), command2 is not executed.
- If command1 fails (returns a non-zero exit status), command2 is executed.
Example: If the file does not exist, create it touch file.txt || echo "File created"