Ubuntu – Top Command to Change Default Shell

Here’s the command you can use to change default shells in Linux systems. Changing shells in the same Ubuntu (Linux) operating system is a little tricky. It’s okay that you can manage many shells in a single system. The only condition is each shell path 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.