Ever look over someone's shoulder in the computer lab while you are finishing your C program or Lit
Hum paper and see something amiss? Instead of having the normal "dollar sign" preceding their typed
words on cunix, this student has
something different, such as the name of the computer they are on, or
the subdirectory they are in. Where did that '$' go?
Well, all you need is one file and your boring little '$' can be
majestically changed into a 'aloha|/h/u1/a/abc123>'. The name of the
file is called .profile and the following will show you what to add to this
file to configure your user environment when you login. If you already
have a .profile, then you might consider adding the text below to it.
In order to edit the file, you will need to pick up a FAQ on unix or
familiarize yourself with a good unix editor like emacs (or pico).
The following lines should be added to your .profile in order to display
what local machine you are on and what directory you are presently in.
export HOST=`hostname`
export HOSTNAMES='aloha bonjour ciao konichiwa merhaba namaste inibara
sawasdee mhoro locarno ahola kiaora ahnnyong vanakam labdien'
export PS1='$HOST|$PWD>'
By adding these few lines, other people will be looking over your
shoulder wondering how come you don't have just a dollar sign. Another
cool thing about using those lines in your .profile, is that when
you change to a different directory, your 'aloha|/h/u1/a/abc123>' will
update to 'aloha|/h/u1/a/abc123/newdirectory>', or whatever new directory
you have moved to.
In addition to just getting your dollar sign to change to something a
bit more fancy, you can add aliases to eliminate unnecessary, repetitive
typing. For example, lets say whenever you login, you check to see if
your friend at Carnagie Mellon is logged in (so maybe you can initiate a
ytalk). Instead of always typing 'finger [email protected]', you
can add an alias to your .profile in the following way:
alias friend='finger [email protected]'
If you are familiar with Ms-Dos, you might want to add strings like the
following:
alias dir='ls -l'
alias cls='clear'
Finally, you can add items to your .profile which just execute once after
your login, including the following:
date
xfiend
Or, if you ALWAYS go straight from logging in to checking your email,
include the following:
pine
With the addition of these lines to your .profile you will accomplish
two things: First, any novice who looks at your screen will think you're
really smart; and second, you will have reconfigured your environment and
made cunix a lot easier to use.