Skip to main content
`sudo echo` doesn't work, formatting and grammar
Source Link

From chshthe chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells/etc/shells.

So you needcan either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to as root

sudo chsh -s /usr/local/bin/bash "$USER"

or add /usr/local/bin/bash to /etc/shells (sudo echo /usr/local/bin/bash >>/etc/shells). to make it a "standard shell"

echo /usr/local/bin/bash | sudo tee -a /etc/shells
chsh -s /usr/local/bin/bash

But noteNote that the fact that which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your PATH$PATH.

From chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.

So you need either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to add /usr/local/bin/bash to /etc/shells (sudo echo /usr/local/bin/bash >>/etc/shells).

But note that the fact which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your PATH.

From the chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.

So you can either run chsh as root

sudo chsh -s /usr/local/bin/bash "$USER"

or add /usr/local/bin/bash to /etc/shells to make it a "standard shell"

echo /usr/local/bin/bash | sudo tee -a /etc/shells
chsh -s /usr/local/bin/bash

Note that the fact that which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your $PATH.

Marked up code as code.
Source Link
dhag
  • 16.3k
  • 4
  • 57
  • 66

From chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.

So you need either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to add /usr/local/bin/bash/usr/local/bin/bash to /etc/shells/etc/shells (sudo echo "/usr/local/bin/bash"bash >> /etc/shells).

But note that the fact which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin/bin is before /usr/local/bin/usr/local/bin in your PATHPATH.

From chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.

So you need either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to add /usr/local/bin/bash to /etc/shells (sudo echo "/usr/local/bin/bash" >> /etc/shells).

But note that the fact which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your PATH.

From chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.

So you need either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to add /usr/local/bin/bash to /etc/shells (sudo echo /usr/local/bin/bash >>/etc/shells).

But note that the fact which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your PATH.

Source Link
Ant
  • 525
  • 4
  • 6

From chsh manual:

When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.

So you need either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to add /usr/local/bin/bash to /etc/shells (sudo echo "/usr/local/bin/bash" >> /etc/shells).

But note that the fact which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your PATH.