Ubuntu Tutorials - Herong's Tutorial Examples
∟Shell - The Command-Line Interpreter
This chapter provides introductions and tutorial examples on Ubuntu shells, which are command-line interpreters and scripting languages. '/bin/bash' is the default shell for interactive sessions. '/bin/dash' is the default shell for shell scripts.
What Is Shell
What Is Bash (Bourne Again SHell)
Create and Run Bash Script
Bash Command Line Interpretation Steps
Bash Shell Session Customization
Command Input/Output Redirection
Shell Session Command History
"tmux" - Terminal Multiplexer
Takeaways:
- /bin/bash, Bourne Again SHell (Bash),
is the default shell on Ubuntu computers for interactive sessions.
- /bin/dash, The Debian Almquist SHell (Dash),
is the default shell on Ubuntu computers for shell scripts.
- "type -a command" looks up the command in 4 sources:
alias, user-defined function, built-in command, and program file.
- ~/.bashrc contains commands to be executed when
a non-login and interactive Bash session starts.
- "history" displays past commands used in the current and previous shell sessions.
- ~/.bash_history carries past commands from the previous
session to the next session.
- "<" in command line redirects input channel to a file instead of the keyboard.
- ">" or ">>" in command line redirects output channel to a file in replace or append mode.
- "2>" or "2>>" in command line redirects error channel to a file in replace or append mode.
- "&>" or "&>>" in command line redirects both output and error channels
to a file in replace or append mode.
- "|" or "|&" in command line pipes output channel or output+error channels
to the next command as input.
- "tmux" tool can be used to manage multiple shells in a single terminal window.
- "tmux" tool automatically keeps its shells running when the terminal is disconnected.
Table of Contents
About This Book
Introduction to Ubuntu Systems
GNOME - Desktop Interface and Environment
►Shell - The Command-Line Interpreter
Process Management
Memory Management
Files and Directories
APT (Advanced Package Tool)
Network Connection on Ubuntu
Internet Networking Tools
SSH Protocol and ssh/scp Commands
Administrative Tasks
References
Full Version in PDF/EPUB