Oracle Consulting and Training
Home Tutorials Case Studies Training Consulting Subscribe to ezine Contact Us About Us Legal Notices
For Better, Faster, Smarter

A Brief UNIX® Tutorial For Beginners

This is just a short UNIX tutorial to act as an introduction for beginners by providing a brief history of the operating system, its philosophy and its relevance today.

History of UNIX - From MULTICS To eunuchs

UNIX was developed by a group of researches including Ken Thompson and Dennis Ritchie at Bell Labs in 1969 on a DEC PDP 7 - a small, general purpose, time sharing system which even for that time had very limited resources.  The group took ideas from another system they had used called MULTICS and created an emasculated re-interpretation of it and so called the new system UNICS (later changed to UNIX) to rhyme with eunuchs - the first of many puns associated with this o/s. The first versions of UNIX were machine dependent but in 1973 Ritchie and Thompson rewrote the kernel - the core of the operating system - in the C programming language, making it machine independent. Since then enhancements have been made for networking, 32 bit and 64 bit hardware etc. and UNIX now runs on everything from mobile phones (iOS is based on a variant of UNIX and Android is based on Linux - an open-source implementation of UNIX) to mainframes. From the beginning the philosophy of UNIX was minimalist - partly by choice and partly by necessity - and it was designed as a series of atomic programs that interact. These atomic programs can be regarded as falling into two categories: kernel programs which handle resource allocation, swapping, scheduling etc. and provide the file system; and the shell programs which provides the (non-graphical) user interface and utilities such as editors.                                           User This design philosophy has enabled UNIX to change with the times by being easily portable and providing a rich and productive environment.

Getting Started With UNIX

UNIX has a reputation of being difficult to use but that is not the case. Its simplicity of design actually makes it easy to use - once you get used to it! The biggest difference between Microsoft Windows and UNIX is the file system. Under UNIX the file system is hierarchical - every directory is a child of the root directory which means that as a user you don’t need to worry about whether your file is on an internal disk, on an external disk or a USB stick as long all the devices are mounted and have been added to the file system. For example if in MS Windows your file is in C:\Windows\Users\Nick\archive,  in UNIX the path might be /usr/nick/archive . The leading “/” indicates the root directory.  Follow this link to learn more about the UNIX file system. Another point to remember is that UNIX is case sensitive. This applies to all commands and their options, all directories, file names, user names and, of course, passwords. Thus /usr/nick/archive is not the same as /usr/NICK/archive and your username will most likely be lower case. Finally note that UNIX assumes that you know what you’re doing and doesn’t usually ask for confirmation before, for example, deleting files as per your command.

Useful Commands

Commands in UNIX include any program or shell script so the list of commands is potentially endless but here are a few of the more useful commands/utilities that are found on every system with a brief explanantion. Most commands in UNIX also have several optional parameters and flags and so can be quite complex but here we are just looking at the simplest form. Getting help man command - display the UNIX manual page (help) for the specified command. Eg man ls What files exist? ls - show the file(s) in the current directory ls file -  show the specified file(s)/directory(ies) contents.  For example: ls /usr/nick/archive (assuming archive is a folder containing one file called notes) would display notes . ls /usr/nick/archive/dave (assuming there is no file called dave in the folder)would display the following error message: ls: cannot access /usr/nick/archive/dave: No such file or directory ls test - assuming your current directory has a file called test would display test  Working with files cat file - display the contents of the specified file on the screen. NB,  cat doesn’t care if the file is a text file or not - it displays the contents anyway! Specifying a directory generates an error message. more file  - display the contents of the specified file on the screen a screenfull at a time. Specifying a directory or a non-text file generates an error message. head/tail file  -  display the first few/last few lines of the specified file eg. head test mv file1 file2 -  rename file1 to file2 eg. mv test oldtest rm file  - delete specified file eg. rm test cat > file  - take input from the keyboard and write it to the specified file This UNIX tutorial has only just scratched the surface so to learn more see our tutorial on the UNIX file system or continue with part 2 (coming soon) or see our tutorial on Linux.  --------------------------------------- Looking to sky-rocket productivity, save time and reduce costs? Training is a highly cost-effective and proven method of boosting productivity. Smartsoft offers instructor-led training in UNIX/Linux and related technologies on or off site in cities across the UK as well as self-study online training. See our scheduled UNIX training courses, or let us know your requirements. Oracle tips and tricks Subscribe to our newsletter, jam-packed full of tips and tricks to help you slash costs, sky-rocket productivity and make your systems better, faster and smarter. Smartsoft Computing Ltd, Bristol, England  Need help? Contact Us This site uses woopra.com to gather statistical information about our visitors. This data is aggregated to show industry trends (such as browser share). However, this data shall be the average of many thousands of visits and is in no way linked to individuals. View woopra privacy policy.       View Smartsoft privacy policy Oracle and Java are registered trademarks of Oracle and/or its affiliates. UNIX® is a registered trademark of The Open Group. Other names may be trademarks of their respective owners. © Copyright Smartsoft Computing Ltd 2014. All rights reserved.
Bookmark and Share
  Shell
 kernel
Site Menu
For Better, Faster, Smarter Oracle Consulting and Training

A Brief UNIX® Tutorial For Beginners

This is just a short UNIX tutorial to act as an introduction for beginners by providing a brief history of the operating system, its philosophy and its relevance today.

History of UNIX - From MULTICS To eunuchs

UNIX was developed by a group of researches including Ken Thompson and Dennis Ritchie at Bell Labs in 1969 on a DEC PDP 7 - a small, general purpose, time sharing system which even for that time had very limited resources.  The group took ideas from another system they had used called MULTICS and created an emasculated re- interpretation of it and so called the new system UNICS (later changed to UNIX) to rhyme with eunuchs - the first of many puns associated with this o/s. The first versions of UNIX were machine dependent but in 1973 Ritchie and Thompson rewrote the kernel - the core of the operating system - in the C programming language, making it machine independent. Since then enhancements have been made for networking, 32 bit and 64 bit hardware etc. and UNIX now runs on everything from mobile phones (iOS is based on a variant of UNIX and Android is based on Linux - an open-source implementation of UNIX) to mainframes. From the beginning the philosophy of UNIX was minimalist - partly by choice and partly by necessity - and it was designed as a series of atomic programs that interact. These atomic programs can be regarded as falling into two categories: kernel programs which handle resource allocation, swapping, scheduling etc. and provide the file system; and the shell programs which provides the (non-graphical) user interface and utilities such as editors.                                           User This design philosophy has enabled UNIX to change with the times by being easily portable and providing a rich and productive environment.

Getting Started With UNIX

UNIX has a reputation of being difficult to use but that is not the case. Its simplicity of design actually makes it easy to use - once you get used to it! The biggest difference between Microsoft Windows and UNIX is the file system. Under UNIX the file system is hierarchical - every directory is a child of the root directory which means that as a user you don’t need to worry about whether your file is on an internal disk, on an external disk or a USB stick as long all the devices are mounted and have been added to the file system. For example if in MS Windows your file is in C:\Windows\Users\Nick\archive,  in UNIX the path might be /usr/nick/archive . The leading “/” indicates the root directory.  Follow this link to learn more about the UNIX file system. Another point to remember is that UNIX is case sensitive. This applies to all commands and their options, all directories, file names, user names and, of course, passwords. Thus /usr/nick/archive is not the same as /usr/NICK/archive and your username will most likely be lower case. Finally note that UNIX assumes that you know what you’re doing and doesn’t usually ask for confirmation before, for example, deleting files as per your command.

Useful Commands

Commands in UNIX include any program or shell script so the list of commands is potentially endless but here are a few of the more useful commands/utilities that are found on every system with a brief explanantion. Most commands in UNIX also have several optional parameters and flags and so can be quite complex but here we are just looking at the simplest form. Getting help man command - display the UNIX manual page (help) for the specified command. Eg man ls What files exist? ls - show the file(s) in the current directory ls file -  show the specified file(s)/directory(ies) contents.  For example:  ls /usr/nick/archive (assuming archive is a folder containing one file called notes) would display notes . ls /usr/nick/archive/dave (assuming there is no file called dave in the folder)would display the following error message: ls: cannot access /usr/nick/archive/dave: No such file or directory ls test - assuming your current directory has a file called test would display test  Working with files cat file - display the contents of the specified file on the screen. NB,  cat doesn’t care if the file is a text file or not - it displays the contents anyway! Specifying a directory generates an error message. more file  - display the contents of the specified file on the screen a screenfull at a time. Specifying a directory or a non-text file generates an error message. head/tail file  -  display the first few/last few lines of the specified file eg. head test mv file1 file2 -  rename file1 to file2 eg. mv test oldtest rm file  - delete specified file eg. rm test cat > file  - take input from the keyboard and write it to the specified file This UNIX tutorial has only just scratched the surface so to learn more see our tutorial on the UNIX file system or continue with part 2 (coming soon) or see our tutorial on Linux.  --------------------------------------- Looking to sky-rocket productivity, save time and reduce costs? Training is a highly cost-effective and proven method of boosting productivity. Smartsoft offers instructor-led training in UNIX/Linux and related technologies on or off site in cities across the UK as well as self-study online training. See our scheduled UNIX training courses, or let us know your requirements. Oracle tips and tricks Subscribe to our newsletter, jam-packed full of tips and tricks to help you slash costs, sky-rocket productivity and make your systems better, faster and smarter. Smartsoft Computing Ltd, Bristol, England  Need help? Contact Us This site uses woopra.com to gather statistical information about our visitors. This data is aggregated to show industry trends (such as browser share). However, this data shall be the average of many thousands of visits and is in no way linked to individuals. View woopra privacy policy.       View Smartsoft privacy policy Oracle and Java are registered trademarks of Oracle and/or its affiliates. UNIX® is a registered trademark of The Open Group. Other names may be trademarks of their respective owners. © Copyright Smartsoft Computing Ltd 2014. All rights reserved.
Bookmark and Share
  Shell
 kernel