Using UNIX
Last modified Friday, 23-Dec-2011 14:36:05 UTC.
- Command line Computing (the right thing for Computer Scientists)
- You type a command, the computer obeys
- Terminal sessions
- Once you have logged into a lab machine, avoid the temptation
to start clicking at things. Really, that's for wimps.
Actually, it's OK for starting applications, but it's not
fast enough for real computing.
- Start a terminal session ... the little window thing.
When you start a terminal session you'll be "in" your
home directory.
- Start another terminal session if you want ... you can have
lots of them running at the same time.
- Now you need to learn some UNIX commands ... the best way is
too keep asking someone who knows them.
Here're a few:
- passwd - allows you to change your password
- date - displays the date and time
- ls - lists the files in your current directory
- ls -l - lists the files with extra information
- ls -a - lists all the files, including hidden ones
(they start with a .)
- cat - displays a file's contents
- less - displays a file's contents one page at a
time
- cp - copies a file
- mv - renames or moves a file
- rm - removes files
- man - manual pages
- logout (or control-D) logs you out of the terminal
session
- Directories
- You are probably familiar with the tree-of-directories-and-files
most operating systems impose on the disk space. Gotta love it.
In review ...
- There's a place on the harddisk where you can store all
your files.
That's your home directory.
- You can create subdirectories to organize your files.
Windoze users call subdirectories "folders".
- Terminal session commands for manipulating directories
- mkdir - make a subdirectory
- cd - moves you to another directory
(N.B., cd .. moves you to the parent directory)
- rmdir - remove a subdirectory
- Use the tree to organize your work.
- Editing
- vi - edit a file (for gurus)
- Plain text editor (i.e., will run over network connections)
- Available on just about any UNIX system
- About 35% of all serious UNIX hackers still prefer
vi (or a derivative)
- vim is an improved version, and in the lab running
vi will run vim.
- vimtutor will get you going
- gvim - edit a file (for aspiring gurus)
- A graphical version of vim, which may be a good
way to get into vim.
- emacs - edit a file (for gurus with flat noses)
- About 35% of all serious UNIX hackers use Emacs.
Also widespread use on other operating systems
- emacs has zillions of extensions
- Doing ^H t nside emacs will get you going
- gedit - edit a file (for non-gurus)
- Windowing full-featured editor (i.e., will not, in general,
run over network connections)
- Not available everywhere
- The Help menu will get you going