Introduction to Linux operating system
What is Linux?
A Unix-like Operating System A famous open source project
Free to use, distribute, modify under a compatible licence Produced by a large developer and user community
A combination of many projects
Cost of commercial development estimated at USD 7 billion Companies often make money by selling:
o Support o Training
Linux distributions
- Ubuntu - Debian - Fedora - Redhat - CentOS - SuSELinux FUD
hard to install, support for different hardware
− try recent distribution (eg. Ubuntu)
it's ugly
− Gnome, KDE, XFCE ... (are they all ugly?)
something free can't be good
− ?
it works different than Windows
What can it do for you?
Full operating system
Works well on a variety of hardware, including older hardware You can adapt it to fit your needs
Thousands of programs available Secure by design
LAMP stack (Linux, Apache, MySQL, PHP)
Supports a wide range of programming languages Scalable
GPL licence and source code
GPL is viral: sharing of changes in GPL
software is requirement to the benefit of community
When programmers on the Internet can read,
redistribute, and modify the source for a piece of software, it evolves
People improve it, people adapt it, people fix
bugs. And this can happen at a speed that, compared to conventional software
History
GNU project started 1984 to produce a Unix-like OS
Founded by Richard Stallman
Wrote the GNU manifesto in 1985 outlining philosophy Software that is free means more than free of charge
"It means that much wasteful duplication of system programming effort will be avoided. This effort can go instead into advancing the state of the art."
By early 1990s many of the GNU OS utilities were complete
Meanwhile....
Linus Torvalds starts work on the Linux Kernel
First version released in 1991
Changes Linux to GPL licence in 1992 Combined with GNU to make an OS
The first “Distros”...
1992 - MCC Interim Linux
1992 - Softlanding Linux System (SLS) 1993 - Debian
Linux Today
High profile adoptions:
French Police
French Parliament City of Munich
Amazon Google
Dreamworks (to produce Shrek)
Preinstalled:
Sub notebooks: EEE & OLPC £99 laptop
Dell
Server hardware
Bioinformatics
Information technologies used for biology,
BLAST, HMMER, CLUSTALW...
Lots of data, lots of challenges
different programming languages specialized libraries
− BioPerl − BioJava − BioPython
Case Study: SecondLife
Linden Labs uses Linux for SecondLife Servers
Uses 2000 servers
Servers located in San Francisco and Dallas Uses Debian Linux
CTO: Cory Ondrejka said Debian chosen as
can scale massively with a small number of IT staff
Each geographic area corresponds to a
processor running software known as a “sim”
Linux on the desktop
Different desktop systems available Choose the one you like the best!
Naming Files
Files are named by
− naming each containing
directory
− starting at the root
This is known as the
pathname /etc/conf1
Some Special File Names
Some file names are special:
− / The root directory (not to be confused with the root user) − . The current directory
− .. The parent (previous) directory − ~ My home directory
Examples:
− ./a same as a
Linux Command Basics
To execute a command, type its name and
arguments at the command line
ls -l /etc
Command
name Options
(flags)
Command: ls
List directory contents ls has many options
− -l long list (displays lots of info) − -t sort by modification time
− -S sort by size
− -h list file sizes in human readable format − -r reverse the order
“man ls” for more options
Redirecting Output
The output of a command may be sent (piped)
to a file:
ls -l > output
“>” is used to specify the output file
Redirecting Input
The input of a command may come (be piped)
from a file:
wc < input
“<” is used to specify the input file
General Syntax: *
File Commands
cp <fromfile> <tofile>
− Copy from the <fromfile> to the <tofile>
mv <fromfile> <tofile>
− Move/rename the <fromfile> to the <tofile>
rm <file> Remove the file named <file>
mkdir <newdir> Make a new directory called
<newdir>
Other commands
whoami – print the name of the current user id – print information about the current user
who – print a list of other users who are logged
in
date – print the current date and time on the
server
cal – print a calendar for the current month echo – print a text string to the screen
Where to Get Help
You can always read the manual! To see the “man page” for the ls command:
Windows console
Start -> Run -> cmd d: cd <path> dir > dirlist.txt help dir notepad exitDownload PuTTY
file: putty.exe
Linux commands
whoami print effective userid ls list directory contents
ls –a
man ls an interface to the on-line
reference manuals
whatis ls display simple manual
page descriptions
pwd print name of current/working
directory