
Indentify Active Shell
If you are using Linux or Unix Terminal and are not able to determine which shell are you currently active in, you can determine it by simply echoing $0 on the current prompt.
Examples:b2391b608026# echo $0
zsh
root@b2391b608026:/# echo $0
bash
root@b2391b6026:/# echo $0
rbash
# echo $0
dash
# echo $0
sh
If you want to know the list of shells available on your Operating System, just cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash
/bin/zsh
/usr/bin/zsh
More Posts related to Bash,
- How to start or open a new bourne-again shell (bash) session on Windows using Command Line CMD
- How to create new user account in Windows bash
- Bash Hello World! Script Tutorial
- How to Compare Strings in Bash
- How to see Created Accessed Modified and Changed dates of a file using bash terminal command
- Command to Sort File In Reverse Order [Unix/Linux/macOS]
- Bash command to wait for seconds
- [fix] bash: ssh: command not found
- bash: netstat: command not found
- Know Bash shell version command
- List all Username and User ID using Bash Command
- How to use Autocomplete and Autosuggestion in Shell Commands
- How to know the current shell you are logged in?
- [Fix] bash: script.sh: /bin/bash^M: bad interpreter: No such file or directory
- 'pwd' is not recognized as an internal or external command, operable program or batch file. [Windows]
- How to Kill a port using bash terminal command?
- How to fix bash ping command not found error
- Install Bash Completion on macOS
- bash get year 2021 calendar
- How to check your IP using bash for Windows?
- Bash For Loop Example
- Fix bash: script.sh: Permission denied Error
More Posts:
- iOS Fix: This app is no longer shared with you. To use it, you must buy it from the App Store. - Apple
- JavaScript date in yyyy-MM-dd format - JavaScript
- JavaScript : redirect page to other url - Android
- Maven Eclipse (M2e) No archetypes currently available - Java
- Error : Invalid key hash.The key hash does not match any stored key hashes - Android
- How to turn off Facebook autoplay videos on timeline - Facebook
- Center align text in TextView Android Programming - Android
- How to perform Find and Replace using vim Editor - vi