Technical Note - Customising your UNIX environment
SummaryThis document outlines how to customise your UNIX environment, and the risks involved.
Benefits of customisation
- To make your working environment more pleasant, such as changing your wallpaper to something more calming!
- To make it easier to do the things you want frequently, such as having programs start up when you log in.
- To make it possible to do things most other people don't want to do, such as using web authoring tools that are not enabled by default.
Risks of customisation
- If the ECS Programmers make upgrades to the default customisation files, either for bug fixes or feature upgrades, you may be screening yourself from these enhancements.
- If you don't know what you are doing, you can make mistakes which might make it impossible to use programs, or even to log in. Use caution!
How to customise
Optional software packagesSeveral utilities, or sets of utilities, are available on the system, but not enabled as standard for every user. This could be for any of a number of reasons, for example:
- The utilities are not available on every one of our mixed bag of hardware platforms
- There are commands which might clash with something else
- Adding many commands for every user complicates their setup and may slow down their interaction with the system.
needat the command prompt. When you see a package you would like to enable, type
need [package]. To have this package loaded whenever you log in, you can add the command to your
~/.cshrcfile (don't move or remove the
need SYSlastlines in here!)
Environment variablesEnvironment variables are definitions which are usually set in a shell, and then inherited by all the programs and processes which are started directly or indirectly by that shell. A few standard variables control the behaviour of a number of different programs:
- EDITOR: Used by programs like
gripeto determine which program to use to allow you to edit data. You might want to set this to
- PRINTER: Used by
lprto determine the printer if none is specified. Most applications invoke
lpr, so will inherit this setting.
- PAGER: Used by programs like
manto determine which program to control your window with. The default is often
/usr/bin/more, but many people prefer
~/.cshrcfile, for example:
... setenv EDITOR emacs setenv PAGER "/usr/bin/less" ...
ShellThe shell is the command-line interface you use. The ECS default is a shell called
tcsh. The documentation is very long, so we'd suggest finding tutorials for things you might want to do. Three common tasks are changing the prompt (the beginning of the line where you type your command; you might want to know the folder you are in, or the current time, or such) defining new commands with
aliasand putting programs or scripts in your PATH. You would make all these, and any other, shell customisations in the file
~/.cshrc. MIT has selected the most popular variables for your shell prompt. Norm Matloff at UC Davis has a good introduction to setting your PATH and aliases.
Changing shell from
Advanced users only
Short answer: Don't do this.
Long answer: Changing your shell.