Linux-Lecture1 113607
Linux-Lecture1 113607
Operating Systems
Introduction to LINUX
Today’s Topics:
– Introduction to Unix/Linux
– VirtualBox
– Ubuntu install (your Homework 1)
Introduction to Linux
UNIX
History of UNIX
History of UNIX
1973 Unix is re-written mostly in C, a new language
developed by Dennis Ritchie.
Being written in this high-level language greatly
decreased the effort needed to port it to new
machines.
Introduction to Linux
History of UNIX
What is LINUX
LINUX Distributions
Mandrake: http://www.mandrakesoft.com/
RedHat: http://www.redhat.com/
Fedora: http://fedora.redhat.com/
SuSE/Novell: http://www.suse.com/
Debian: http://www.debian.org/
Ubuntu: http://www.ubuntu.org/
How is Linux Used?
Personal Workstation
File and Print Server
Internet Service Provider
Three-tier Client/Server
Able to host huge databases in big
corporations
Linux Hardware
Requirements
• CPU
• Main memory
• Optical Drive
• Graphic card
• Hard Drive
• Sound Card
CPU
• IBM
• INTEL
• Pentium I – III
• No 286, 386, 486, and Celeron
• AMD
• K6/II/III
• Duran
• Athlon, Athlon XP/MP
Main Memory
• Capacity:
– Minimum requirement 64MB
– Recommended 128MB and up
Optical Drive
• CD-ROM / DVD-ROM
– Sony, Philips, and Acer
– SuSE website has compatibility listing
• CD-R
– Sony, Philips, and Acer
Graphics Cards
• X Window System
Why Use Linux?
• Costs less
• Stable
• Reliable
• Extremely powerful
LINUX VS WINDOWS
Linux vs. Windows
• Financial Differences
• Technical Differences
• End-User Differences
Linux vs. Windows
Financial Differences
Linux vs. Windows
COST
LINUX WINDOWS
Online Downloads Free Not Available
Retail Price, CD $50 $300
Linux vs. Windows
• Cost for Businesses
– Companies have to spend millions for
licenses for every individual windows
computer
– For Linux companies don’t have to spend
anything
Linux vs. Windows
Technical Differences
Linux vs. Windows
Keeping up to date
By Upgrading
Linux upgrades faster than Windows
Compatibility
Linux is Backward Compatible unlike
Windows
Linux vs. Windows
Features Provided
Both support Dynamic Caching
Both have Multi-user Support
Linux vs. Windows
• Application Differences
No commercial word processor for Linux,
which matches the quality for Windows
Linux vs. Windows
End-User Differences
Linux vs. Windows
• Proprietary vs. Open Source
Windows is a Proprietary Technology
Applications will only work on Windows
Linux – Open Source
Linux
Complete information needed for
download
Technical help – Available on Internet
(user must be comfortable with UNIX
system)
Windows word processor is better than
Linux
Linux vs. Windows
In The Commercial Arena
Head to head competition
Used side by side as servers
Both handled daily workload for several
small business operations
System Administration – Most significant
difference
Linux – tougher environment
Linux requires learning multi-user issues
built into Unix-file permissions
Conclusion
“When is it best to use Linux and when
should some other operating system be
preferred?”
It all depends on the user
Introduction to Linux
UNIX Structure
Introduction to Linux
UNIX Structure
Shell
• shell: An interactive program that uses user input to
manage the execution of other programs.
– A command processor, typically runs in a text
window.
– User types commands, the shell runs the
commands
– Several different shell programs exist:
• bash : the default shell program on most
Linux/Unix systems
• We will use bash
• Other shells: Bourne, csh, tsch
Why use a shell?
• Why should I learn to use a shell when GUIs
exist?
– faster
– work remotely
– programmable
– customizable
– repeatable
Example shell commands
command description
pwd print the current working directory
cd changes the working directory
ls lists files in a directory
man brings up the manual for a command
exit logs out of the shell
$ pwd
/homes/raphael
$ cd CSU07308
$ ls
file1.txt file2.txt
$ ls –l
-rw-r--r-- 1 rea fac_cs 0 2020-11-29 17:45 file1.txt
-rw-r--r-- 1 rea fac_cs 0 2020-11-29 17:45 file2.txt
$ cd ..
$ man ls
$ exit
System commands
command description
man or info get help on a command
clear clears out the output from the console
exit exits and logs out of the shell
date output the system date
cal output a text calendar
uname print information about the current system
File System
File System
Each node is either a file or a directory of files,
where the latter can contain other files and
directories.
You specify a file or directory by its path name,
either the full, or absolute, path name or the one
relative to a location.
The full path name starts with the root, /, and
follows the branches of the file system, each
separated by /, until you reach the desired file,
e.g.:
/home/condron/source/xntp
Introduction to Linux
File System
A relative path name specifies the path relative to
another, usually the current working directory that
you are at. Two special directories :
. the current directory
.. the parent of the current directory
So if I'm at /home/frank and wish to specify the path
above in a relative fashion I could use:
../condron/source/xntp
This indicates that I should first go up one directory
level, then come down through the condron
directory, followed by the source directory and then
to xntp.
Introduction to Linux
Access Permissions
There are three permissions for any file, directory
or application program.
Access Permissions
Each of the three permissions are assigned to
three defined categories of users.
The categories are:
Access Permissions
One can easily view the permissions for a file by
invoking a long format listing using the command
ls -l.
Access Permissions
The permissions for this file are listed are listed at
the start of the line, starting with rwx.
Access Permissions
This listing indicates that the file is readable,
writable, and executable by the user who owns the
file (user juan) as well as the group owning the file
(which is a group named student).
$ ls –l
Introduction to Linux
Moving in Directories
cd try_it - Changes the directory to try_it
pwd: Prints the contents of the current working
directory
Example: if current working directory is
/home/smith/try_it
cd .. Move to superior directory
pwd : Prints /home/smith
cd /home The absolute path
pwd : Prints /home
cd The system is returned to the user home
directory
pwd : Print /home/smith
Introduction to Linux
Make Directory
Remove Directory
Copy File
Remove File
The command rm file_a , removes the file_a from
the system
If you use wildcard. For example
rm h*c , you will remove all files beginning with h
and ending with c which are in working directory.
If you write rm * , you will erase all files from
your working directory.
Introduction to Linux