-1

I have these shell in my VM

# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash
/usr/bin/tmux
/usr/bin/screen
/bin/zsh
/usr/bin/zsh

Is it a good thing ? Should I safely remove any of this extra shell?

I think I only use bash Do they come automatically with Ubuntu ?

code-8
  • 442
  • 1
    As at https://unix.stackexchange.com/q/559624/5132 , the notion of just going around deleting stuff with zero attempt to understand what it is is a poor one. What does it mean for something to be listed in /etc/shells? is a quite different question, which you aren't even asking. (Contrast https://unix.stackexchange.com/q/414643/5132 and https://unix.stackexchange.com/q/319735/5132 .) – JdeBP Dec 31 '19 at 08:59

1 Answers1

3

In general, this is a fine number of shells. dash is the default /bin/sh implementation, and bash is the default interactive shell, and together these account for the first four items. zsh is a common user shell with a lot of features, and many experienced users are likely to use it.

tmux and screen are terminal multiplexers that allow users to switch between multiple terminal windows. They are very commonly used, and are listed in /etc/shells because some people set them as their shell so they're always launched on login.

The only thing that having these in /etc/shells does is allow users to set them as their login shell if they're installed. All of these are commonly used and considered secure for normal users. If you have security concerns about the packages, you can remove them (for zsh, tmux, and screen) and that will prevent folks from using them. dash and bash are considered essential, and if you try to remove them, you will break your system.

I consider myself quite security conscious, and I have all of these programs on my system without concern, and I administer systems for my job that have all of these as well. As long as you have security updates regularly applied, there should be no problem.

bk2204
  • 4,099
  • 7
  • 9