Environment Variables

There are a number of variables provided by the Korn shell that allow you to customize your working environment. Some are automatically set by the Korn shell, some have a default value if not set, while others have no value unless specifically set.

Table 7.1 lists some of the Korn shell variables. The following sections cover some of the important variables and how they affect your working environment. All the available variables are listed in the Appendix E.

Table 7.1. Some Korn Shell Environment Variables
CDPATH search path for cd when not given a full pathname (no default)
COLUMNS window width for in-line edit mode and select command lists (default 80)
EDITOR pathname of the editor for in-line editing (default /bin/ed ...

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.