180 likes | 751 Views
What is UNIX?. UNIX is a multi-user, multi-tasking operating system running on many computer hardware platforms. UNIX was invented by K. Thompson in early 70s at Bell Lab. UNIX is simple and flexible, but has many variations. Unix Systems. SunOS/Solaris Sun Microsystems
E N D
What is UNIX? • UNIX is a multi-user, multi-tasking operating system running on many computer hardware platforms. • UNIX was invented by K. Thompson in early 70s at Bell Lab. • UNIX is simple and flexible, but has many variations.
Unix Systems • SunOS/Solaris Sun Microsystems • Digital Unix (Tru64) Digital/Compaq • HP-UX Hewlett Packard • Irix SGI • UNICOS Cray • NetBSD, FreeBSD UC Berkeley / the Net • Linux Linus Torvalds / the Net
Unix Philosophy • Multiuser / Multitasking • Flexibility / Freedom • Conciseness • Everything is a file • File system has places, processes have life • Designed by programmers for programmers
Unix Command Line Structure A command is a program that tells the Unix system to do something. It has the form: • command options arguments • “Whitespace” separates parts of the command line • An argument indicates on what the command is to perform its action • An option modifies the command, usually starts with “-”
Help • man: On-Line manual • Unix is CASE SENSITIVE! • Man, man, mAn, MAN are seen differently in Unix. Here, only “man”will work. • ^ generally means <CTRL>
Directory Navigation and Control Commands • pwd print working directory • cd change working directory (“go to” directory) • mkdir make a directory • rmdir remove directory
File Permissions • chmod [options] file • chmod u+w file • gives the user (owner) write permission • chmod g+r file • gives the group read permission • chmod o-x file • removes execute permission for others
Permissions: numerical • chmod [options] file • using numeric representations for permissions: • r = 4 • w = 2 • x = 1 • Total: 7
File permissions numerical ex chmod [options] file chmod 7 7 7 filename user group others gives user, group, and others r, w, x permissions
File maintenance commands • chgrp change the group of the file • can be done only by member of group • chown change the ownership of a file • rm remove (delete) a file • cp copy file • mv move (or rename) file
Other commands • lpr –P<printername> filename.txt • General command to print a file in Unix. • E.g. lpr –Pc700 somejunk.txt • Prints the text file somejunk.txt to printer c700.
Useful Commands • wc <filename> • Word Count: displays lines, words, chars • pine –i • Unix program to check email. -i flag indicates: go to inbox immediately • ispell • Spell checker <CTRL> + C to quit
ssh, sftp • For the security of the system. • ssh –l USERNAME HOSTNAME • e.g. ssh –l ricqui ece.rutgers.edu to log in to ECE computers. • sftp is used to transfer files
References • http://wks.uts.ohio-state.edu/unix_course/unix.html • Also see course webpage for Rutgers Unix guides and tutorials: including webpage creation