introduction to linux operating system - pbfbioserv.pbf.hr/bioinfo/lectures/linuxos.pdf · full...
TRANSCRIPT
Introduction to Linux operating system
module Basic Bioinformatics PBF
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 Supporto Trainingo Custom changes
Linux distributions
- Ubuntu - Debian- Fedora- Redhat- CentOS- SuSE
- Big list at: http://distrowatch.com
Linux 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− some would call this benefit :-)
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
Where might you find Linux?
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 development, seems astonishing
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
Better support for Linux users
Bioinformatics Information technologies used for biology,
BLAST, HMMER, CLUSTALW... Lots of data, lots of challenges different programming languages specialized libraries
− BioPerl− BioJava− BioPython− BioBike (LISP)
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”
Have plans to use more open source tools
Linux on the desktop
Different desktop systems available Choose the one you like the best! Can adapt to Mac & Windows styles of operation
Naming Files
Files are named by− naming each containing
directory
− starting at the root
This is known as the pathname
/etc/conf1
/home/pero/b
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
− ../pero/x go up one level then look in directory pero for x
Linux Command Basics
To execute a command, type its name and arguments at the command line
ls -l /etc
Command name Options
(flags)
Arguments
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 Options can be combined: “ls -ltr”
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: * “*” can be used as a wildcard in unix/linux
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>
rmdir <dir> Remove an (empty) directory
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:
man ls
Windows console
Start -> Run -> cmd d: cd <path> dir > dirlist.txt help dir notepad exit
Download PuTTY
file: putty.exe host: bioserv7.bioinfo.pbf.hr
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 cd change directory