Link to home
Start Free TrialLog in
Avatar of Los Angeles1
Los Angeles1

asked on

How do I set my system to ksh

I installed RHEL 5.6 on my system.  It is strange, it uses bash as a default do not quite understan why

However, how do I set my system to ksh, permanently ?
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Explanation:

The first command will modify the file /etc/default/useradd to set ksh as the default for newly created users.

The second command will modify /etc/passwd to set the shell for existing users.

useradd -D will display existing defaults.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tintin
Tintin

bash is the default on pretty much all Linux systems as most Linux distros don't include ksh in their default install.
Also, bash and ksh are 99% compatible, so there's really not a huge difference between the two unless you are using some very, very advanced/obscure features of ksh.
There's nothing obscure in ksh.

Perhaps Greensburo just doesn't like this old pipe/subshell problem (Remember? Reassigning variables using a pipe and e.g read?)

If his bash is <  4.2 not even the "shopt -s lastpipe" workaround is available.