How to Change Default Shell In Ubuntu

Here’s the command to change default shell. Changing default shell in the Ubuntu (Linux) operating system is a little tricky.

You can manage many shells in a single system. The only thing you need to ensure is path for each shell should be different.

What is a path?

In Ubuntu, the / tells the root directory. If you give $cd /, you can see the directory changed to root.

The directory name appended to / is a path to that directory. Best example is /srini/bannu/vasu.

Check shells present in your system

Here is a screen from the actual Ubuntu system. Just display all shells using cat command from/etc/shells

How to see the shells present in your system

Current Shell

Firstly, you need to identify the current shell. Then, type $ echo $SHELL. It prints the default shell. In this case, it’s already pointed to bash.

Change Default Shell

The next step is to chang

The next step is to change the shell from bash to ksh. See the screen for how you can do it.
Just type ksh. It switches to ksh shell. You can also do vice versa that means ksh to bash.

bash to ksh

After changing the shell, just check ksh version. That’s it – how to change shells.

Related posts

References

Get new content delivered directly to your inbox.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.