IT 244: Introduction to Linux/Unix
Reading assignment for this week is chapter 1 of Sobell,
Welcome to Linux and Mac OS X
You need read this before next week's class.
All reading assignments are posted at
Remember, homework 1 is due this Sunday by 11:59 PM.
You will find it here.
There are three parts to this assignment
- An email containing answers to questions on the assignment
- Registering with class discussion area for this course on Piazza
- Forwarding you UMB email to an email account you check frequently
You must send me the email with answers to questions even if you have
taken another course with me.
You must forward your UMB email since I will use that address to send
you your scoring sheets for assignments.
I will also use this address to send you news of any changes in assignments or
I will check that the forwarding is working by sending a test email to your
UMB account a week from this coming Friday.
You must reply to this test message or you will lose 15 points
Remember, you will lose 2 points for every day that the assignment is late.
All homework assignments are posted at
Unless you hear otherwise, you should expect a homework assignment each week.
Completing the Apply Process
A few of you have not completed the Apply process.
You must fix this by going to the see the operators in the Unix Lab.
I will read out the names of those students who have not completed the Apply
process after taking attendance.
- We will cover most of the chapters in the textbook
- We will skip chapters 6 & 7 - the
- These programs are text editors ...
- that are run at the command line ...
- They are used to create and modify text files
- Text files have no formating ...
- like you would find in Microsoft Word
- Text files only contain characters
- Chapters 6 & 7 show you how to use
- But the best way to learn an editor is to use it ...
- not read about it in a book
emacs are full featured text editors
- You will need to use a text editor in this course ...
- to complete your homework and Class Exercises
emacs take some time to learn
- Instead of teaching you one of these editors ...
- I'll show you
nano, a simple text editor
nano is good enough for our purposes
- You do not have to use
- You can use any text editor that runs on Unix/Linux
- This rules out Notepad or Word
- I'll also skip chapter 9 which covers the TC shell ...
- because it is not used much these days
- We will use the Bash shell in this course
- Bash has more features than the TC shell
- Bash is the default shell in most Linux installations
- We will not be installing Linux in this course
- Modern installers are very good - almost idiot proof ...
- so installing Linux is little more than running the installer ...
- and answering a few simple questions
- If you want to install Linux on your machine ...
- and are having trouble ...
- you can get help from the Boston Linux User Group
- This group holds periodic "Installfests" at MIT
- where knowledgeable people can help you with the installation
- All work for the course will be done on a Linux machine ...
- running Ubuntu Linux 16.04
- You will use your laptops or home machines ...
- to connect to users3.cs.umb.edu
Connecting to the Linux Machine from Home
- The operating system
is the software that allows you to use a computer
- The textbook defines an operating system as
An operating system is the low-level software that schedules tasks,
allocates storage, and handles the interfaces to peripheral hardware,
such as printers, disk drives, the screen, keyboard, and mouse
- An operating system like a city government
- A city government provides resources - water, sewage, snow plowing
- It also provides protection - police and fire departments
- The operating system provides resources ...
- like access to memory, files and devices
- It also provides protection to keep one program ...
- from interfering with another ...
- and to keep other people from messing with your files
- Every computer has an operating system of some sort
- Nowadays computers are found in most of the durable goods you buy ...
- like cars and refrigerators
- You never see these computers ...
- but they are there making everything work properly
- These "invisible" computers are called embedded systems
- They too have operating systems ...
- but they are much simpler than those on a desktop or laptop
Components of the Operating System
- There are two components of an operating system
- The kernel is a program that is always running
- It controls all access to any hardware connected to the machine
- Every program that runs on a computer needs resources ...
- like memory and access to files
- It gets these resources from the kernel
- The kernel is like a traffic cop
- The kernel makes sure that two programs don't use the same resource ...
- at the same time
- Utilities are programs that allow you use and manage computer resources
- I will use the terms Unix and Linux interchangeably in this course ...
- but they are distinct
- Unix is an operating system developed as a research tool at Bell Labs
- Bell Labs was created as a research facility ...
- for the Bell telephone system
- Some of the most important advances of the 20th century ...
- came from Bell Labs
- Researchers there have won many awards ...
- including some very important Nobel Prizes
- Unix has a number of powerful features
- It is often used in academic, engineering and research environments
- Unix was developed before Graphical User Interfaces (GUIs) become common
- The Unix philosophy is to create many small programs ...
- that do one thing well
- Unix allows simple tools to be strung together ...
- to perform a complex task
- This allows people to write commands that do complicated things ...
- on the fly
- When first created, Unix was given away free to universities ...
- and many Computer Science students learned to use it ...
- and grew to like its power
- Talented programmers down through the years have made many contributions to Unix ...
- which improved it greatly
- This tradition continues with Linux
Different Unix Releases
- There is no single collection of software that can be called Unix or Linux
- A Linux/Unix distributions consist of
- The kernel is always present in the computer's memory ...
- and deals directly with the hardware ...
- like the CPU, memory and the hard disc
- A program cannot talk directly to the hardware ...
- but must do so through the kernel
- The utilities help you use the machine's resources
- Applications are programs that are used to get work done ...
- such as a word processor or an email client
- Over the years a number of different Unix distribution have appeared
- One popular Unix distribution is BSD ...
- which stands for Berkeley Software Distribution
- It was developed by the Computer Systems Research Group ...
- at the University of California at Berkeley
- Berkeley charges nothing for this Unix
- The BSD license is the least restricted open source license
http://www.opensource.org/licenses/bsd-license.php for more information
- The Macintosh runs a customized version of Unix ...
- that comes mainly from BSD
- Another popular Unix distribution is Unix System V
- It was released commercially by AT&T ...
- the original corporate sponsor of Bell Labs
- There were four major releases of System V
- Release 4, abbreviated SVR4, enjoyed the greatest commercial success
- The Unix used at UMB was, until recently, Solaris
- Solaris was developed by Sun Microsystems as a commercial product
- Subsequently, Sun released most of the code base as an open source project ...
- called Open Solaris
- Sun was acquired by Oracle in January 2010
- We now use the Ubuntu Linux distribution at UMB
GNU and the Free Software Foundation
- Richard Stallman is a legendary figure in the Unix world
- He received a MacArthur "genius" grant
- He worked for many years at the MIT Artificial Intelligence Laboratory
- When Stallman started programming there was no software industry ...
- as we know it today
- The software came with the hardware ...
- and companies sometimes distributed the source code ...
- along with the machines
- Stallman and his associates liked this open environment ...
- where ideas could be shared freely
- In these early days, companies were not too concerned about trade secrets
- Stallman and his fellow programmers had access to the source code ...
- for the programs they used
- When a bug was discovered, they could look in the source code ...
- and fix the problem directly
- As the software industry became more commercialized ...
- companies refused to release their source code
- They wanted to sell software independently from the hardware ...
- and to do this they needed to keep the source code secret
- This this bothered Stallman
- He could no longer look at the source code ...
- to fix the bugs he found
- Instead, he had to report the bug to the company ...
- and then wait for a fix
- In 1983, Stallman announced plans for the GNU Operating System
- It would be distributed under the GNU License ...
- and would be compatible with Unix
- GNU is a recursive acronym ...
- that stands for "GNU is not Unix"
- In 1985 Stallman founded the Free Software Foundation
- It's mission was to develop GNU software ...
- and to advance the cause of free software
- By "free" Stallman meant that every user has the right to read ...
- and modify the source code
- It did not mean that an organization could not charge for the software
- The software was "Free as in speech, not beer"
- The Free Software Foundation charged a modest amount for its software
- Stallman's definition of free software is very strict ...
- and he distinguishes it from open source software
- Stallman has written books on the subject of free software ...
- which can be obtained from the
Free Software Foundation
- The GNU License is fairly elaborate
- If any person or company makes a change to software distributed under the GPL ...
- they must distribute the improved source code under the same license
- This means a company cannot take software distributed under the GPL ...
- make some improvements ...
- and then sell it as proprietary software
- The GNU project first focused on developing tools ...
- that could be used to write the software for the operating system
- Their most important contributions were the programmable text editor,
- and the compiler,
- Most of Unix is written in C ...
- so developing the GNU C compiler was an important first step
- Work on the kernel, the heart of the operating system ...
- was saved for last ...
- since it would be the most difficult
- The GNU kernel was to be named Hurd
- In the early 90's as Linus Torvalds was working on his Masters thesis
- At this time he began a personal project ...
- that eventually became a Unix-like kernel
- He released the source code for this kernel to the public
- Many programmers looked at this code and liked it
- They sent in improvements which Linus added to the code
- This improved kernel was widely in open source circles
- Together with many of the GNU tools ...
- it formed the core of what came to be called Linux
- Today Linus Torvalds is the chief architect of the Linux kernel
- There are many Linux distributions ...
- each released by a different group
- Each distribution consists of different choices ...
- from various software packages ...
- for each component of the operating system
- The two most common distributions are Ubuntu and Red Hat
- CentOS is a noncommercial Linux distribution ...
- which uses source code provided by Red Hat for their commercial Linux distribution
- The machine we'll be using in this class is users3
- It is a virtual machine running Ubuntu 16.04.1 LTS
- Ubuntu is based on Debian Linux
- Development of Ubuntu is led by Canonical ...
- a company based on the Isle of Man in Great Britain ...
- and owned by South African entrepreneur Mark Shuttleworth
- Ubuntu is named after the Southern African philosophy of ubuntu ...
- which is often translated as "humanity towards others"
- A new Ubuntu version is released every 6 months
- The Ubuntu version number is composed of the year and month of its release
- So version 16.04 was released in April of 2016
- LTS stands for "Long Term Support"
- An LTS version will be supported for 5 years after its release
- A new LTS version is released every 2 years
- Every Ubuntu release also has a name
- The name consists of two words:
- An adjective
- An animal whose name shares the same first letter
- The name for Ubuntu 16.04 LTS is "Xenial Xerus"
- A xerus is an African ground squirrel
- Xenial means friendly relations between hosts and guests
- One of the reasons for Ubuntu's success is its package manager
- If you type in a command that is not installed ...
- Ubuntu will suggest packages that will install the software
- The shell
is the program you are talking to ...
- when you type something at the command line
- The shell listens to what you type at the command line ...
- and asks the kernel to execute the commands you entered
- The shell is the program you use to talk to the kernel
- Only the kernel can create the
- that is a running program
- Modern shells provide a number of features that make them easier to use
- Down through the years there have been a number of different Unix shells
- Today, the two most common shells are the TC shell and Bash
- We will be using Bash in this course
- To run a Unix command you go to the command line ...
- type the name of the command ...
- followed, perhaps, by options and arguments ...
- and then hit Enter ...
- or Return on a Mac
- Options change what the command does
- For example the
ls command lists the contents of a directory
foo.txt it244 work
ls is used with the
-l (for long) option ...
- more information is presented
$ ls -l
-rw-r--r-- 1 it244gh libuuid 16 2012-06-26 16:19 foo.txt
lrwxrwxrwx 1 it244gh libuuid 34 2012-02-07 09:46 it244 -> /courses/it244/s12/ghoffman/it244gh
drwxr-xr-x 2 it244gh libuuid 512 2012-06-27 11:08 work
- Arguments are the things on which the command operates
ls is given the name of a directory as an argument ...
- it will display the contents of that directory
$ ls html
- Most Unix/Linux commands are very short, to save typing ...
- and usually have mnemonic value
- For example,
ls stands for "list"
Today's Class Exercise
- Today you will use your laptops ...
- to connect to the virtual machine users3
- You will find the instructions on the Class Exercise
- If you have not completed the apply process ...
- you will not be able to log in
- We'll be using the Linux machine named users3 ...
- for all our work in this course
- In today's Class Exercise, you will enter your first Unix commands
- The Class Exercise will tell you what do to ...
- and what commands to enter at the command line
- Type the commands specified, including any options ...
- and then the arguments, if any
- Options are proceeded by a -