Skip to Content
Using csh & tcsh
book

Using csh & tcsh

by Paul DuBois
July 1995
Beginner to intermediate
244 pages
5h 58m
English
O'Reilly Media, Inc.
Content preview from Using csh & tcsh

Getting To Know .cshrc and .login

If you're not familiar with your .cshrc and .login files, you should run the ls command in your home directory to find out if they exist. Specify the –a ("show all") option since ls doesn't normally show dot files (files with names that begin with a period):

% ls -a
.           .cshrc     .mailrc    Letters      Papers    calendar   src
..          .exrc      .msgsrc    Mail         Projects  junk       tmpfile
.Xdefaults  .login     .plan      Misc         bin       mbox

If you don't have .cshrc and .login files, you can create them with any text editor, but it's likely that generic versions of .cshrc and .login were installed in your home directory when your account was created. The generic versions might look something like this:

% more .cshrc
if ($?prompt) then
    set prompt = "% "
    set history = 20
    set cdpath = ( ˜ ˜/Projects ˜/Papers )
endif
alias h history
alias ll ls -l
alias print 'pr \!* | lpr'
set path = ( /bin /usr/bin /usr/ucb ˜/bin . )
% more .login
tset -I -Q
stty erase ^h intr ^c
setenv TERM vt100
biff y

It's okay if you don't understand the contents of .cshrc and .login the first time you look at them, but you should strive to understand them eventually. If you see commands in your startup files that you're not familiar with, check for them in the index of this handbook, read their manual pages, or ask a knowledgeable user on your system about them. Also, it's a good idea to see how other people use their startup files. Ask more experienced users for copies of their files, and ask them to explain the parts that you don't ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Shells by Example

Linux Shells by Example

Ellie Quigley

Publisher Resources

ISBN: 9781449377526Errata Page