A Mini UNIX Tutorial
What’s UNIX? An operating system run on many servers/workstations Invented by AT&T Bell Labs in late 60’s There are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.
The UNIX operating system is made up of three parts; the kernel, the shell and the programs The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password.
To open an UNIX terminal window, click on the "Terminal" icon from Applications/Accessories menus.
n UNIX Terminal window will then appear with a % prompt, waiting for you to start entering commands.
Files and processes Everything in UNIX is either a file or a process A process is an executing program identified by a unique PID (process identifier) A file is a collection of data. They are created by users using text editors, running compilers etc. Example of files: documents, directory, etc.
Basic UNIX Most UNIX functionality is accessed through the UNIX prompt. Text based, like MS-DOS
UNIX Directory Structure Files are grouped in the directory structure. The file-system is arranged like hierarchical tree structure. The top of the tree is called “root” which usually contains several sub-directories. “/”(forward slash) is used to present the “root”.
What is Directory? Directories can hold files and other directories / binetc users tmp backup user1 user2 … usern public_html file1 index.html root
UNIX – Basic commands man – manual. Use “man name” to bring up a manual entry for command or program name. clear – clear. Clears the screen. Navigation ls – list. Lists folders/files in a directory cd – change directory. Use “cd name” to navigate to directory name. pwd – print working directory. Prints the path of the current directory. du – disk usage. Shows the disk usage of the current directory
Programs Some basic UNIX programs: emacs – text editing pico – another text editor gcc – C compiler pine – program for internet news and