This shows you the differences between two versions of the page.
| — | faq:techies02 [2011/04/30 18:57] (current) – created clemens | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| + | [02] HOW DO I CONFIGURE MY ENVIRONMENT SETTINGS AT LOGIN? | ||
| + | This file (.profile) is already setup for you with some generic defaults. | ||
| + | In the file you will find information on customizing your session. | ||
| + | can edit the file directly using an editor (emacs, ed, vi or pico). | ||
| + | that any changes to the file effect future login sessions. | ||
| + | |||
| + | --- UNIX Shell HACKS --- | ||
| + | |||
| + | If you are using the UNIX Bourne Shell or Korn Shell, you need to | ||
| + | be aware of the " | ||
| + | as an init file by setting up various environment variables and | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | [ ENV SETTINGS ] | ||
| + | |||
| + | A typical .profile looks much like this: | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | HZ=60 | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | stty erase ' | ||
| + | |||
| + | | ||
| + | |||
| + | For both the Bourne and Korn shells, the default for PS1 is " | ||
| + | If you'd rather have the current directory for your prompt, here | ||
| + | is a ksh hack to do it. Put this function in your .kshrc file. | ||
| + | |||
| + | chdir () | ||
| + | { | ||
| + | \cd ${*:-$HOME} ** PS1=" | ||
| + | } | ||
| + | |||
| + | alias cd=chdir | ||
| + | |||
| + | | ||
| + | would be a hack on the PS1 environment variable itself: | ||
| + | |||
| + | | ||
| + | |||
| + | This hack also gives you the return code for the last command executed. | ||
| + | |||
| + | For the novice user, both of these are useful. | ||
| + | | ||
| + | |||
| + | alias dir=ls -xsFb | ||
| + | |||
| + | make using UNIX a little bit easier. | ||
| + | |||
| + | To get a list of processes currently being run by your userid, type: | ||
| + | |||
| + | ps -U $LOGNAME | ||
| + | | ||
| + | If you have a process running that you wish to terminate (but don't | ||
| + | have a TTY associated with it) get the pid, then use the kill command: | ||
| + | |||
| + | kill -HUP (other signals include -9) | ||
| + | </ | ||
| + | |||
| + | [[techies|back]] | ||