Introduction to UNIX
Getting the most out of the Physics and Astronomy computers will require at least a little knowledge of UNIX. Don't worry, it's painless.
Here are some UNIX commands:
| Command | Description |
|---|---|
|
|
lists the files and subdirectories in the current directory |
|
|
a simple text file editor, hit control-X to save and exit |
|
|
removes (deletes) the file called "filename" |
|
|
change the current directory to subdir |
cd .. |
change directory to the parent directory |
|
|
without an arguments, this sends you to your home directory |
|
|
make a subdirectory called dirname |
|
|
remove a subdirectory called dirname |
|
|
sends a postscript file to the printer |
|
|
view the print queue, and JOBNUMBERS |
|
|
used to remove a print job from the queue |
|
|
change your password |
Using these commands, you could try the following exercise:
| Task | Thing to Type |
|---|---|
| Make a subdirectory called 'animals' |
|
| Go into that new directory |
|
| Create a text file called cow |
|
| Now type something bovine and hit... | control-X |
| List the file you have created |
|
| Print the file |
|
| Remove the file you have created |
|
| List the now empty directory to confirm the deletion |
|
| Change to the parent directory again |
|
| delete the animals directory |
|
The behavior of UNIX commands can be modified using 'options'. For example, if you want to list not only the 'normal' files, but also the 'hidden' files, try the following:
ls -a
Or to get a more detailed listing of your files, try:
ls -l
To learn more about the options for a given command, try typing:
man commandname
That will get you the online manual page.
If you want to close one of your extra text windows, type:
exit
If you type exit or logout in your primary login window, it will log you out of the system.