Linux Introduction: Presenter: Jolanta Soltis
Linux Introduction: Presenter: Jolanta Soltis
I-TEACH
THE EDGE IN KNOWLEDGE
Overview
What is Unix/Linux? History of Linux Features Supported Under Linux The future of Linux
I-TEACH I-TEACH
Before Linux
In 80s, Microsofts DOS was the dominated OS for PC Apple MAC was better, but expensive UNIX was much better, but much, much more expensive. Only for minicomputer for commercial applications People was looking for a UNIX based system, which is cheaper and can run on PC Both DOS, MAC and UNIX were proprietary, i.e., the source code of their kernel is protected No modification is possible without paying high license fees I-TEACH
THE EDGE IN KNOWLEDGE
Beginning of Linux
A famous professor Andrew Tanenbaum developed Minix, a simplified version of UNIX that runs on PC Minix is for class teaching only. No intention for commercial use In Sept 1991, Linus Torvalds, a second year student of Computer Science at the University of Helsinki, developed the preliminary kernel of Linux, known as Linux version 0.0.1 I-TEACH
Linux Today
Not only character user interface but graphical user interface is available Commercial vendors moved in Linux itself to provide freely distributed code. They make their money by compiling up various software and gathering them in a distributable format
I-TEACH
THE EDGE IN KNOWLEDGE
Linux groups
http://www.linux.org/groups/
I-TEACH
THE EDGE IN KNOWLEDGE
Linux Distributions
http://www.linux.org/dist/list.html http://fedora.redhat.com/
I-TEACH
THE EDGE IN KNOWLEDGE
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
I-TEACH
THE EDGE IN KNOWLEDGE
File Handling(contd...)
pwd - print name of current working directory Usage: pwd
vim Vi Improved, a programmers text editor Usage: vim [OPTION] [file]... eg. vim file1.txt
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A H
File Handling(contd...)
cp copy files and directories Usage: cp [OPTION]... SOURCE DEST eg. cp sample.txt sample_copy.txt cp sample_copy.txt target_dir mv move (rename) files Usage: mv [OPTION]... SOURCE DEST eg. mv source.txt target_dir mv old.txt new.txt
I-TEACH
THE EDGE IN KNOWLEDGE
File Handling(contd...)
rm - remove files or directories Usage: rm [OPTION]... FILE... eg. rm file1.txt , rm rf some_dir
find search for files in a directory hierarchy Usage: find [OPTION] [path] [pattern] eg. find file1.txt, find name file1.txt
history prints recently used commands Usage: H I- T E A C history
THE EDGE IN KNOWLEDGE
I-TEACH
Pattern
A Pattern is an expression that describes a set of strings which is used to give a concise description of a set, without having to list all elements. eg. ab*cd matches anything that starts with ab and ends with cd etc. ls *.txt prints all text files
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
Text Processing
cat concatenate files and print on the standard output Usage: cat [OPTION] [FILE]... eg. cat file1.txt file2.txt cat n file1.txt echo display a line of text Usage: echo [OPTION] [string] ... eg. echo I love India echo $HOME
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
Text Processing
grep- print lines matching a pattern Usage: grep [OPTION] PATTERN [FILE]... eg. grep I apple sample.txt wc- print the number of newlines, words, and bytes in files. Usage: wc [OPTION]... [FILE]... eg. wc file1.txt wc L file1.txt
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
Text Processing
cat concatenate files and print on the
standard output Usage: cat [OPTION] [FILE]... eg. cat file1.txt file2.txt cat n file1.txt
echo display a line of text Usage: echo [OPTION] [string] ... eg. echo I love India I-echoC$HOME TEA H
THE EDGE IN KNOWLEDGE
I-TEACH
Text Processing
sort sort lines of text files
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
System Administration
chmod
change file access permissions Usage: chmod [OPTION] [MODE] [FILE] eg. chmod 744 calculate.sh
chown change file owner and group Usage: chown [OPTION]... OWNER[:[GROUP]] FILE... eg. chown remo myfile.txt
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
change user ID or become superuser Usage: su [OPTION] [LOGIN] eg. su remo, su passwd update a users authentication tokens(s) Usage: passwd [OPTION] eg. Passwd who show who is logged on Usage: who [OPTION] eg. who , who b , who q
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
Process Management
ps report a snapshot of the current processes Usage: ps [OPTION] eg. ps, ps el
kill to kill a process(using signal mechanism) Usage: kill [OPTION] pid eg. kill 92275
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
Archival
tar to archive a file Usage: tar [OPTION] DEST SOURCE eg. tar cvf/home/archive.tar /home/original tar xvf /home/archive.tar zip package and compress (archive) files Usage: zip [OPTION] DEST SOURSE eg. zip original.zip original unzip list, test and extract compressed files in a ZIP archive Usage: unzip filename eg. unzip I-TEACH original.zip
THE EDGE IN KNOWLEDGE
client (remote login program) ssh is a program for logging into a remote machine and for executing commands on a remote machine Usage: ssh [options] [user]@hostname eg. ssh X [email protected] scp secure copy (remote file copy program) scp copies files between hosts on a network Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2] I- T E A C H I-TEACH file1.txt eg. scp
THE EDGE IN KNOWLEDGE
ssh SSH
File Systems
fdisk partition manipulator eg. sudo fdisk l mount mount a file system Usage: mount t type device dir eg. mount /dev/sda5 /media/target umount unmount file systems Usage: umount [OPTIONS] dir | device... eg. umount /media/target
I-TEACH
THE EDGE IN KNOWLEDGE
I- T E A C H
File Systems(contd...)
du estimate file space usage Usage: du [OPTION]... [FILE]... eg. du df report filesystem disk space usage Usage: df [OPTION]... [FILE]... eg. df quota display disk usage and limits Usage: quota[OPTION] eg. Quota-vz
I-TEACH
THE EDGE IN KNOWLEDGE