Adding an alias to the Tcsh Shell

Posted by Jason Noble on 09/14/2008 in Uncategorized |

If you run a command frequently, you can create what is called an alias. The alias is usually a shorter form of the original command.

To make these aliases permament, you should edit .tcshrc in your home directory.

11:32:07 /Users/jasonn $ vi ~/.tcshrc

Add a line of text of the format “alias YYY ‘ZZZ'” where YYY is the command you want to type in, and ZZZ is the command you want to be run.

Examples:

# Show long listing
alias ll 'ls -al'

#  Use VI Improved instead of Vi
alias vi 'vim'     

 # Change into your web directory
alias web 'cd /usr/local/apache/vhosts/jasonnoble.org/htdocs'

This alias ability allows you to type less at your shell prompt. If you find yourself typing the same long command line over and over, try adding an alias to your shell that will save you some time.

Copyright © 2008-2018 Jason Noble's Technical Adventures All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.2.3, from BuyNowShop.com.