Intro to Linux/UNIX

Contents

Intro to Linux/UNIX

text

What is Linux/UNIX?

Operating System

text

Graphical Interface vs. Command Line

Open Source and (usually) Free

text

How to Get or Access Linux and UNIX

Accessing the iSchool Servers

If you have an iSchool account, you already have access to a space on a UNIX server. You can log in and use this space using a number of programs on Windows, Mac, and Linux computers. For Windows, you can use the SSH Client, which you can download from BevoWare (and find a tutorial here: http://www.ischool.utexas.edu/technology/tutorials/start/ssh/ ). On Mac and Linux, use the built-in Terminal application to log in.

Installing your own

stuff

Running without installing

Basic Commands

In general, UNIX commands follow a basic syntax or structure. Usually, the order is: the command itself, any options that you want to add, then the file or group of files you want the command to operate on. However, there are many exceptions to this, and the possible options can differ, so referring to help and documentation is a good idea before trying unfamiliar commands.

The most direct, but not necessarily easiest, way of finding information about a UNIX command is to use man, short for manual. It is built into any Linux/UNIX system; to use it, just type man commandname at the command prompt. However, the contents of a man document are often inscrutable, even to experts, so you may have better luck with a Google search.

Getting Around

Note: I use the words "folder" and "directory" interchangeably.

There are a few quick commands you can use to navigate through your files and folders using the command line. First, you can type pwd, which stands for "Print Working Directory", to show you the full path name of the folder you're currently in. Any commands you type will be carried out on the files inside this folder, unless you specify otherwise.

The next useful command is ls, short for "list". Typing ls will list all of the files and folders contained within the current folder. There are additional options that you can add to ls to get different information, but we'll get to those later. For now, just use ls to see what subfolders there are.

To move to a different folder, use the command cd (change directory); you need to know how your destination folder relates to your current folder. If the new folder is inside the current one, then you can just add the name of that folder: cd subfoldername. To move up a level to the folder that contains your current folder, type cd .. The .. is a shorthand that just means "the folder above me". You can string these options together by separating them with slashes; for example, cd subfolder1/subfolder2 moves you down into subfolder2 which is inside subfolder1, and cd ../../images would move you up two levels and then down from there into the images folder.

Typing cd all by itself without naming a folder to move to will always take you back to your home folder and is very useful in case you get lost or just want to save time typing.

Dealing with Files and Folders

Now that you know how to find things, you should also know how to move, copy, and delete them.


File Naming Rules

Linux and UNIX are pickier about file names than Windows and Macs are. Avoid using spaces in your file names, as they might cause problems later. To separate words, use capital letters or underscores instead: FileName.html or file_name.html. Also, case matters, so Abc, abc, and ABC are all different to a Linux/UNIX computer.

Other Useful Commands

More Information

references and stuff