Using input to customize your environment

Way back in Chapter 8, we talked about setting up your environment variables by customizing the configuration files that run upon login. You can further customize your environment variables by requiring input whenever a startup script runs. For example, you can set your configuration files (which are actually scripts) so that they request that you specify the default editor for the session (Code Listing 16.3).

Code Listing 16.3. When the system asks your preferences, you know you're on top.
[ejr@hobbes ejr]$ su - ejr
Password:
Which editor do you want as the default?
 (vi or pico)
vi
You chose vi!
[ejr@hobbes ejr]$

To use input to customize your environment:

1.
vi .bash_profile
Use your favorite editor ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.