Monday, February 18, 2019

Oracle Linux -- Change Default Shell for a User


You want to change the default shell for a user on Oracle Linux or Red Hat Enterprise Linux


To find out what is the current shell in use for the current user use:

# echo $SHELL

To find available shell in the system use:

# cat /etc/shells


# chsh --list-shells

To change default shell for a user use:

# chsh -s <shell> [<username>]

where <shell> is the path to a shell found from the above steps, <username> - a user to change default shell for

For example:

$ chsh -s /bin/bash oracle
Changing shell for oracle.
Shell changed.

No comments: