Discovering Your Current Environment

A good first step in changing your environment is determining what environment you have. Using the steps in this section, you can discover which environment and shell variables are currently set—including ones set in the configuration files as well as ones you’ve set for the current session (Code Listings 8.1 and 8.2).

Code Listing 8.1. You can find out which variables exist in the zsh, bash, or ksh shells with set.
  [ejr@hobbes ejr]$ set BASH=/bin/bash BASH_VERSION=1.14.7(1) COLUMNS=80 ENV=/home/ejr/.bashrc EUID=500 HISTFILE=/home/ejr/.bash_history HISTFILESIZE=1000 HISTSIZE=1000 HOME=/home/ejr HOSTNAME=hobbes.raycomm.com HOSTTYPE=i386 IFS= LINES=24 LOGNAME=ejr MAIL=/var/spool/mail/ejr MAILCHECK=60 OLDPWD=/home/ejr/src/rpm-2.5.1 ...

Get Unix Third Edition: 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.