Categories

CategoryWeb CategoryLinux

See also

InSilico/LecturingWithBeamerLatex


Introduction

This note describes setting up a Linux terminal (bash and csh) on a standard Windows computer.

Linux on Windows: Cygwin

The application to be pursued is cygwin.

Setting up Cygwin

  1. Download `setup.exe` (download)

  2. Run the app.
    • Check 'download from the internet' so that packages come through from the net.
    • Then 'direct connection'
    • Choose a mirror (e.g. ftp.planetmirror.com is in Australia I believe)

    • Important: the default installation just has a bash shell, to get a c-shell, you must traverse the hierarchy of packages, and under 'shells' choose tcsh (or alternatively, just choose all of the shells.

  3. This should now give a Cygwin launch icon on the desktop; clicking it will launch a bash shell

This installation has many features already, such as: ftp, sed, ls, mv, rm, cp etc. Others can be installed by again hitting setup.exe and selecting more from the directory tree as before.

Setting up a c-shell config

In the home directory of the Cygwin application (to find where this is, type:

 cd <enter>
 pwd <enter>

at the prompt), now in this directory, save a simple text file (by using Notpad for example) called .cshrc (the first dot (.) is important):

# set path = (/usr/local/bin /usr/bin /bin /usr/X11R6/bin /usr/local/tools )
set path = ( $path /usr/local/tools )
setenv EDITOR vim
set prompt = '%% '
set notify
# overloaded commands
alias ls          'ls -F'
alias mv          'mv -i'

Not much of this is important except for the set path = ( $path /usr/local/tools/ ) command since this adds the /tools directory to the 'path' of the terminal. The path are the various places that the terminal will look to run programs from. We are going to add certain programs to this area.

The two set path variants are given -- the first I use fine on this box, the second is probably better for Cygwin since the default path has a heap of stuff in it that is not listed in the first line, best not to meddle. .. /usr/local/tools is the directory I use for placing my own important (by hand) or created scripts.

Refs

  1. http://www.cygwin.com/


CategoryInSilico

Leviathan: InSilico/LinuxOnWindows (last edited 2008-06-06 00:31:16 by sangus)