Linux Shell: Logging In and Terminals
- compnomics
- Mar 17
- 2 min read

The Linux shell is the heart of the command-line interface, providing a powerful way to interact with your system. In this post, we'll cover the basics of logging in and out, managing terminals, and delve deep into the world of Linux shells.
Logging In and Out:
Logging In:
When you boot a Linux system, you'll typically encounter a login prompt.
Enter your username and password to access your user account.
You can also log in remotely via SSH (Secure Shell).
Logging Out:
To log out of a terminal session, you can use the exit command or press Ctrl + D.
For a graphical login, you'll find a logout option in the desktop environment's menu.
Terminal Handling:
What is a Terminal?
A terminal emulator is a program that provides a text-based interface to the shell.
It allows you to interact with the operating system through commands.
You can open multiple terminal windows or tabs to run different tasks simultaneously.
Essential Terminal Commands:
clear: Clears the terminal screen.
Ctrl + C: Terminates the currently running command.
Ctrl + Z: Suspends the currently running command.
fg: Brings a suspended command to the foreground.
bg: Runs a suspended command in the background.
history: Displays a list of previously executed commands.
The Linux Shell: A Deep Dive
What is a Shell?
The shell is a command-line interpreter that acts as an interface between the user and the operating system's kernel.
It reads commands entered by the user, interprets them, and executes them.
Shells provide features like command-line editing, history, scripting, and variable substitution.
Types of Linux Shells:
Bourne Shell (sh):
The original Unix shell, developed by Stephen Bourne at Bell Labs.
Simple and efficient, but lacks many advanced features.
Often used as the system's default shell for compatibility.
Bourne-Again Shell (Bash):
The most widely used Linux shell, developed as a free software replacement for the Bourne shell.
Offers a rich set of features, including command-line editing, history, job control, and scripting capabilities.
The default shell for most Linux distributions.
C Shell (csh):
Developed by Bill Joy at the University of California, Berkeley.
Features C-like syntax and command aliases.
Less popular than Bash, but still used in some environments.
TENEX C Shell (tcsh):
An enhanced version of the C shell, providing improved command-line editing and history features.
Offers more interactive features than csh.
Z Shell (zsh):
A powerful and highly customizable shell that extends Bash's features.
Offers advanced tab completion, spelling correction, and theming options.
Gaining popularity among advanced users.
Korn Shell (ksh):
Developed by David Korn at Bell Labs.
Combines features of the Bourne and C shells.
Offers advanced scripting capabilities and is known for its efficiency.
Choosing a Shell:
The choice of shell often comes down to personal preference and specific needs.
Bash is a good all-around choice for most users.
Zsh is popular among advanced users who desire enhanced features and customization.
To change your shell, use the chsh command.
Example of checking which shell is used:
echo $SHELL
Commentaires