In Linux, a default shell is the command-line interpreter that a user is automatically assigned when they log in. While there are many shells available, here are the most common ones you will encounter:
1. Bash (Bourne Again Shell) - /bin/bash
This is the standard default shell for most Linux distributions (like Ubuntu, CentOS, and Debian).
- Why? It is powerful, user-friendly, and has excellent features like tab-completion and command history.
2. Sh (Bourne Shell) - /bin/sh
This is the "grandfather" of shells. On modern systems, /bin/sh is often just a symbolic link to a faster, simpler shell like dash.
- Usage: It is mostly used for system boot scripts because it is very fast and lightweight, but it lacks the "quality of life" features that humans prefer for typing commands.
3. Zsh (Z Shell) - /bin/zsh
This has become very popular recently and is the default shell on macOS and some Linux distros like Manjaro.
- Features: It includes advanced auto-correction, themes (like "Oh My Zsh"), and powerful plugin support.
4. Dash (Debian Almquist Shell) - /bin/dash
On Ubuntu and Debian, /bin/sh actually points to dash.
- Purpose: It is used strictly for executing system scripts quickly. It is much smaller than Bash but not meant for interactive use by humans.
5. Nologin - /usr/sbin/nologin or /usr/bin/false
You might see this in /etc/passwd for "system users" (like mysql or bin).
- Purpose: It’s a "fake" shell that prevents a user from logging into the system. It’s a security feature for accounts that only need to run background services.
How to see all available shells on your VM?
You can see which shells are installed and valid on your current LabEx environment by running:
cat /etc/shells
In the step you just completed, you moved joker from the basic /bin/sh to the more modern /bin/bash to give them a much better user experience