November 1998
Beginner
368 pages
7h 58m
English
Like bash, ksh also has two prompts you can edit:
The main prompt that you usually think of as the shell prompt. This prompt is called PS1.
A secondary prompt that you see when the system requires additional information to complete a command. Logically, this prompt is called PS2.
You can change either of these prompts using the following steps (we'll modify PS1 in the example). You start by finding your prompt statement (Code Listing 8.12), then modify it in your editor.
To change your ksh prompt:
1. | grep PS1 /etc/profile ~/. profile → ~/.kshrc |
Read now
Unlock full access