linux seminar
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 PresentationTRANSCRIPT
Linux Seminarby noname
Operating System?
• System SW• Manage HW resources• Provide a platform for applications
• Windows, Linux, Mac OS, iOS, Android, DOS, …
Linux?
• OS• Made by Linus Torvalds• Inspired by Unix
• Debian, CentOS, Ubuntu, Fedora, Redhat Linux, Gentoo, Arch, Suse, Slackware, Mandriva, PintOS, …
Why do we use Linux?
• Custom• Free (in some sense)• Open source• Supports multiple users• Has compatibility with Unix-like OSs
User & Group
• Normal users• Root• Sudoers
• In SPARCS?• presparcs group• sparcs group• wheel group
File & Directory
• Actually, both of them are files
• Directory contains files
• If filename starts with ‘.’• Hidden
• .• ..
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
Permission
• Three permission levels for each file• Owner(User)• Owner(Group)• Others
• Slice it!• rwxrwxrwx• r-xr--rw-
Directory Structure
• Tree structure
• /• /home• /home/noname• /etc• /root• /bin• ~/• ~noname/• ~/public_html/• …
Path
• Absolute path• /usr/bin/python• /usr/local/lib/python2.6/dist-packages/django/
• Relative path• public_html/crazy.png
• Working directory
Interface
• GUI• Gnome, KDE, …
• CUI• Terminal
Shell
• Some kind of command line on terminal• Interacts with users
• bash, sh, tcsh, ash, zsh, rc, …• bashrc
ssh
• Secure Shell• Protocol (in some cases, a program)• Default port number for ssh is 22• Opens terminal
Putty
• Program• Supports connection via ssh/telnet• Simple & Easy, but convenient
• Google ‘putty’• or http://www.chiark.greenend.org.uk/~sgtatham/putty/
Putty
Putty
Putty
Commands
• Basic Format• [command] [arg1] [arg2] …
Commands
• ls• ls [path]• ls –a• ls –l• ls –al• ls –a –l• ls -lh
• cd• cd [path]
Commands
• pwd
• rm [path]• rm –f [path]• rm –r [path]• rm –rf [path]• rm –rf /
Commands
• mkdir [path]
• rmdir [path]
• cat [path1] [path2] …• cat –n [path1] [path2] …
Commands
• cp [source1] [source2] [source3] … [destination]• cp -r [source1] [source2] [source3] … [destination]
• mv [source1] [source2] [source3] … [destination]
Commands
• more [path]• less [path]
• less > more
Commands
• passwd• passwd [username]
• ps• ps aux
• top
Commands
• wget [URL]
• ssh sparcs.org• ssh [email protected]
• scp [email protected]:~/public_html/siva.png ./kill/• scp –r ./kill/ [email protected]:~/
Commands
• wc [path1] [path2] …
• grep [word] [path]• grep 대한 애국가 .txt• grep –R [word] [path]
• egrep
Commands
• chmod 744 [path]• chmod 512 [path]• chmod –R 777 [path]
Commands
• tar –zxvf [path]• tar –zcvf [destination] [path1] [path2] …• tar –xvf [path]• tar –cvf [destination] [path1] [path2] …
Commands
• df• df -h
• kill [pid]
Commands
• man [command]
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, …
Wildcard Character
• ? for one character• * for undecided number of characters
• It works for all matching files
Pipe & Redirection
• [command1] | [command2] | [command3] | …• ls –al | egrep ‘^d’• ls –al | egrep ‘^d’ | wc
• [command] > [path]• [command] < [path]• [command] >> [path]• [command] 2> [path]
Techniques
• !foobar…• Ctrl + r• Ctrl + d• Ctrl + l• Ctrl + a• Ctrl + e• Ctrl + u• Ctrl + c• Ctrl + z• Ctrl + \
Putty Techniques
• Mouse drag• Mouse right click• Duplicate Session• Change Settings• Special Command
Etc..
• setuid, setgid, sticky bit, environment varilables, signal, …