linux seminar

36
Linux Seminar by noname

Upload: niran

Post on 24-Feb-2016

45 views

Category:

Documents


0 download

DESCRIPTION

Linux Seminar. by noname. System SW Manage HW resources Provide a platform for applications Windows, Linux, Mac OS , iOS , Android, DOS, …. Operating System?. OS Made by Linus Torvalds Inspired by Unix - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Linux Seminar

Linux Seminarby noname

Page 2: Linux Seminar

Operating System?

• System SW• Manage HW resources• Provide a platform for applications

• Windows, Linux, Mac OS, iOS, Android, DOS, …

Page 3: Linux Seminar

Linux?

• OS• Made by Linus Torvalds• Inspired by Unix

• Debian, CentOS, Ubuntu, Fedora, Redhat Linux, Gentoo, Arch, Suse, Slackware, Mandriva, PintOS, …

Page 4: Linux Seminar

Why do we use Linux?

• Custom• Free (in some sense)• Open source• Supports multiple users• Has compatibility with Unix-like OSs

Page 5: Linux Seminar

User & Group

• Normal users• Root• Sudoers

• In SPARCS?• presparcs group• sparcs group• wheel group

Page 6: Linux Seminar

File & Directory

• Actually, both of them are files

• Directory contains files

• If filename starts with ‘.’• Hidden

• .• ..

Page 7: Linux Seminar

Permission

File Directory

Read Read the file See the list of files in the directory

Write Write to the fileCreate the file, Delete the file, or Rename the file in

the directory

eXecute Execute the file Get into the directory

Page 8: Linux Seminar

Permission

• Three permission levels for each file• Owner(User)• Owner(Group)• Others

• Slice it!• rwxrwxrwx• r-xr--rw-

Page 9: Linux Seminar

Directory Structure

• Tree structure

• /• /home• /home/noname• /etc• /root• /bin• ~/• ~noname/• ~/public_html/• …

Page 10: Linux Seminar

Path

• Absolute path• /usr/bin/python• /usr/local/lib/python2.6/dist-packages/django/

• Relative path• public_html/crazy.png

• Working directory

Page 11: Linux Seminar

Interface

• GUI• Gnome, KDE, …

• CUI• Terminal

Page 12: Linux Seminar

Shell

• Some kind of command line on terminal• Interacts with users

• bash, sh, tcsh, ash, zsh, rc, …• bashrc

Page 13: Linux Seminar

ssh

• Secure Shell• Protocol (in some cases, a program)• Default port number for ssh is 22• Opens terminal

Page 14: Linux Seminar

Putty

• Program• Supports connection via ssh/telnet• Simple & Easy, but convenient

• Google ‘putty’• or http://www.chiark.greenend.org.uk/~sgtatham/putty/

Page 15: Linux Seminar

Putty

Page 16: Linux Seminar

Putty

Page 17: Linux Seminar

Putty

Page 18: Linux Seminar

Commands

• Basic Format• [command] [arg1] [arg2] …

Page 19: Linux Seminar

Commands

• ls• ls [path]• ls –a• ls –l• ls –al• ls –a –l• ls -lh

• cd• cd [path]

Page 20: Linux Seminar

Commands

• pwd

• rm [path]• rm –f [path]• rm –r [path]• rm –rf [path]• rm –rf /

Page 21: Linux Seminar

Commands

• mkdir [path]

• rmdir [path]

• cat [path1] [path2] …• cat –n [path1] [path2] …

Page 22: Linux Seminar

Commands

• cp [source1] [source2] [source3] … [destination]• cp -r [source1] [source2] [source3] … [destination]

• mv [source1] [source2] [source3] … [destination]

Page 23: Linux Seminar

Commands

• more [path]• less [path]

• less > more

Page 24: Linux Seminar

Commands

• passwd• passwd [username]

• ps• ps aux

• top

Page 25: Linux Seminar

Commands

• wget [URL]

• ssh sparcs.org• ssh [email protected]

• scp [email protected]:~/public_html/siva.png ./kill/• scp –r ./kill/ [email protected]:~/

Page 26: Linux Seminar

Commands

• wc [path1] [path2] …

• grep [word] [path]• grep 대한 애국가 .txt• grep –R [word] [path]

• egrep

Page 27: Linux Seminar

Commands

• chmod 744 [path]• chmod 512 [path]• chmod –R 777 [path]

Page 28: Linux Seminar

Commands

• tar –zxvf [path]• tar –zcvf [destination] [path1] [path2] …• tar –xvf [path]• tar –cvf [destination] [path1] [path2] …

Page 29: Linux Seminar

Commands

• df• df -h

• kill [pid]

Page 30: Linux Seminar

Commands

• man [command]

Page 31: Linux Seminar

Commands

• E way edo jonna manayo

• ln, chown, su, sudo, fg, bg, jobs, echo, export, killall, skill, nohup, shutdown, reboot, wall, yes, chsh, man, apropos, umask, chroot, clear, …

Page 32: Linux Seminar

Wildcard Character

• ? for one character• * for undecided number of characters

• It works for all matching files

Page 33: Linux Seminar

Pipe & Redirection

• [command1] | [command2] | [command3] | …• ls –al | egrep ‘^d’• ls –al | egrep ‘^d’ | wc

• [command] > [path]• [command] < [path]• [command] >> [path]• [command] 2> [path]

Page 34: Linux Seminar

Techniques

• !foobar…• Ctrl + r• Ctrl + d• Ctrl + l• Ctrl + a• Ctrl + e• Ctrl + u• Ctrl + c• Ctrl + z• Ctrl + \

Page 35: Linux Seminar

Putty Techniques

• Mouse drag• Mouse right click• Duplicate Session• Change Settings• Special Command

Page 36: Linux Seminar

Etc..

• setuid, setgid, sticky bit, environment varilables, signal, …