Quick methods to discover which shells are present and which shells users actually have assigned. 16.11.2025 | reading time: 2 min Find which login shells the system knows about and which shells users actually use; this helps with troubleshooting and hardening. Run quick checks like `cat /etc/shells` to see approved shells and `getent passwd | cut -d: -f7 | sort -u` to see shells assigned to accounts. Quick demonstration Do it now: run `cat /etc/shells` and you will get paths such as `/bin/sh /bin/bash /usr/bin/zsh /bin/dash` listed; then run `getent passwd | cut -d: -f7 | sort -u` to see which of those are in use by accounts, for example `/bin/bash /usr/bin/zsh`. Useful variations Filter comments with `grep -v '^#' /etc/shells` to get a clean list and use `which zsh` or `command -v zsh` to confirm a shell binary exists; if he needs to allow a new shell for `chsh` or services, add its full path to `/etc/shells` and ensure the binary is present. Related utilities Check assigned shells with `getent passwd`, verify binaries with `which`, and change a user shell with `chsh` (which often consults `/etc/shells`); package manager queries such as `apt` or `rpm` can show which package provided a shell binary. Final note Listing shells is a small step with big impact: it reveals available login environments and helps detect unexpected shells on a host, so make it part of regular audits. Continue exploring Linux system tools and consider formal certification — CompTIA Linux+ or LPIC-1 — with bitsandbytes.academy being an intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. utilities scripting security troubleshooting