Difference between revisions of "Ksh"

From ArchWiki
Jump to: navigation, search
(added minimalistic description of the link offered)
m (expand)
Line 8: Line 8:
  
 
Some features are described here: http://bootiack.livejournal.com/294776.html
 
Some features are described here: http://bootiack.livejournal.com/294776.html
 +
===Making Ksh your default shell===
 +
 +
The chsh command can be used to change a user's default shell without root access if the shell is listed in {{Filename|/etc/shells}}. (If Ksh was installed using pacman, it should already have an entry in {{Filename|/etc/shells}}). 
 +
 +
Grab the full path for Ksh using <code>/usr/bin/which</code>:
 +
 +
$ which ksh
 +
 +
Which will probably output:
 +
 +
/bin/ksh
 +
 +
Change the default shell for the current user:
 +
 +
$ chsh -s /bin/ksh
 +
 +
'''Alternative as root, using usermod'''
 +
 +
Change the default shell for multiple users, using usermod:
 +
 +
# usermod -s /bin/ksh username
 +
 +
{{Note| The user needs to logout and log back in, to start using Ksh as their default shell.}}
 +
 +
After logging back in, verify that Ksh is the default shell with:
 +
 +
$ echo $SHELL

Revision as of 02:30, 23 February 2010


Korn Shell (ksh) is a standard/restricted command and programming language developed by AT&T.

The version from AT&T can be found on AUR (http://aur.archlinux.org/packages.php?ID=13772), but there is also a public domain implementation named "pdksh", which is in extra (http://www.archlinux.org/packages/extra/i686/pdksh/)

Some features are described here: http://bootiack.livejournal.com/294776.html

Making Ksh your default shell

The chsh command can be used to change a user's default shell without root access if the shell is listed in Template:Filename. (If Ksh was installed using pacman, it should already have an entry in Template:Filename).

Grab the full path for Ksh using /usr/bin/which:

$ which ksh

Which will probably output:

/bin/ksh

Change the default shell for the current user:

$ chsh -s /bin/ksh

Alternative as root, using usermod

Change the default shell for multiple users, using usermod:

# usermod -s /bin/ksh username
Note: The user needs to logout and log back in, to start using Ksh as their default shell.

After logging back in, verify that Ksh is the default shell with:

$ echo $SHELL