Changing default shell in Linux
Try linux command chsh
.
The detailed command is chsh -s /bin/bash
.
It will prompt you to enter your password.
Your default login shell is /bin/bash
now. You must log out and log back in to see this change.
The following is quoted from man page:
The chsh command changes the user login shell. This determines the
name
of the users initial login command. A normal user may only change the
login shell for her own account, the superuser may change the login
shell for any account
This command will change the default login shell permanently.
Note: If your user account is remote such as on Kerberos authentication (e.g. Enterprise RHEL) then you will not be able to use chsh
.
Changing default shell to our own written shell in linux
The login shell of a user account is defined inside the unfamous /etc/passwd
file. Just use a plain text editor and change it (e.g. joe /etc/passwd
):
This is a typical example entry:
john:x:1000:100:John Doe:/home/john:/bin/bash
At the end you can see the absolute path of the executable configured as the accounts login shell. Just change it point to your custom shell.
Note that this changes the login shell. So to see the effect you have to relogin, not just to open a new terminal. So either test it by connecting to localhost using ssh for example or logout/login to your graphical desktop.
Changing default shell in Linux Mint
I found the answer on AskUbuntu:
Cinnamon uses gnome-terminal
and one must edit their profile to run any other shell than the default (bash).
How can I change default shell without opening terminal?
- In the Terminal app on your Mac, choose Terminal > Preferences, then click General.
- Under “Shells open with”, select “Command (complete path)”, then enter the path to the shell you want to use.
You can also change this from System Preferences. Head to System Preferences > Users & Groups on your Mac. Click the lock icon and enter your password. Hold the Ctrl key, click your user account’s name in the left pane, and select “Advanced Options.”
Related Topics
How to Extract Filename.Tar.Gz File
How to Request a File But Not Save It with Wget
How to Purge Disk I/O Caches on Linux
Cut or Awk Command to Print First Field of First Row
Delete Files with String Found in File - Linux Cli
Does Os X Have an Equivalent to /Dev/Shm
Is It Safe to Delete the Journal File of Mongodb
How to Set Up Curl to Permanently Use a Proxy
Amazon Linux: "Apt-Get: Command Not Found"
Compile/Run Assembler in Linux
How to Check in Bash Whether a File Was Created More Than X Time Ago
How to Map a Hostname *And* a Port with /Etc/Hosts
How to Tar Certain File Types in All Subdirectories
Join on First Column of Two Files
About the Memory Layout of Programs in Linux