Switching to the TENEX C Shell on Arch Linux


Screenshot of the tcsh man page
Screenshot of the tcsh man page

Having been a FreeBSD guy for a while, I’m so used to the TENEX C Shell (tcsh) that when I move to Linux or later versions of Mac OS X that use bash as the default, it feels all alien and foreign (Wikipedia’s tcsh article shows OSs that still tcsh as the default). If I need to do some shell scripting I use basic sh, but I always try to use tcsh as my interactive shell whenever possible.

I don’t know if this is common knowledge or whether it’s just what I’m used to, but I find tcsh’s .tcshrc/.cshrc configuration files much more intuitive and cleaner than bash’s .bashrc/.profile files too. But that’s for a future post.

While there’s a surprising absence of a tcsh page in Arch Linux’s usually comprehensive and easy to read wiki, Eric Bélanger has made it available from the Pacman system for both i686 and x86_64, and studiously keeps them up to date. Thanks to him, installing it is a snap.

# pacman -Sy tcsh

When installed tcsh will reside in the root /bin directory. This means if you want to set it as your default shell and pretend in a small way you’re running FreeBSD (tee hee), run this as the user you want to change:

% chsh
Enter "/bin/tcsh" when prompted, without quotes!

Icon from the Tango Desktop projectI remember being sternly told in the FreeBSD documentation that you absolutely never want to change the default shell of the root user to a shell you’ve installed from a package manager because if for some reason an upgrade fails and the shell you assigned to it breaks, you’re up the creek without a paddle. Given Arch Linux treats all parts of the system the same I’m not sure whether this applies here too, but for the sake of safety I’m keeping the root account using bash.

Now when I log into Arch Linux on my Armada M300 I’m in tcsh with the identical user prompt and virtually the same command aliases I had on FreeBSD. It gives you a nice, fuzzy, warm feeling. I’m tempted to learn tcsh programming one day just because most of the world is on bash :-D

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.