370 likes | 502 Views
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
E N D
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 • Debian, CentOS, Ubuntu, Fedora, Redhat Linux, Gentoo, Arch, Suse, Slackware, Mandriva, PintOS, … Linux?
Custom • Free (in some sense) • Open source • Supports multiple users • Has compatibility with Unix-like OSs Why do we use Linux?
Normal users • Root • Sudoers • In SPARCS? • presparcs group • sparcs group • wheel group User & Group
Actually, both of them are files • Directory contains files • If filename starts with ‘.’ • Hidden • . • .. File & Directory
Three permission levels for each file • Owner(User) • Owner(Group) • Others • Slice it! • rwxrwxrwx • r-xr--rw- Permission
Tree structure • / • /home • /home/noname • /etc • /root • /bin • ~/ • ~noname/ • ~/public_html/ • … Directory Structure
Absolute path • /usr/bin/python • /usr/local/lib/python2.6/dist-packages/django/ • Relative path • public_html/crazy.png • Working directory Path
GUI • Gnome, KDE, … • CUI • Terminal Interface
Some kind of command line on terminal • Interacts with users • bash, sh, tcsh, ash, zsh, rc, … • bashrc Shell
Secure Shell • Protocol (in some cases, a program) • Default port number for ssh is 22 • Opens terminal ssh
Program • Supports connection via ssh/telnet • Simple & Easy, but convenient • Google ‘putty’ • or http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty
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 noname@sparcs.org • scp noname@sparcs.org:~/public_html/siva.png ./kill/ • scp –r ./kill/ root@bit.sparcs.org:~/ 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 edojonnamanayo • ln, chown, su, sudo, fg, bg, jobs, echo, export, killall, skill, nohup, shutdown, reboot, wall, yes, chsh, man, apropos, umask, chroot, clear, … Commands
? for one character • * for undecided number of characters • It works for all matching files Wildcard Character
[command1] | [command2] | [command3] | … • ls –al | egrep ‘^d’ • ls –al | egrep ‘^d’ | wc • [command] > [path] • [command] < [path] • [command] >> [path] • [command] 2> [path] Pipe & Redirection
!foobar… • Ctrl + r • Ctrl + d • Ctrl + l • Ctrl + a • Ctrl + e • Ctrl + u • Ctrl + c • Ctrl + z • Ctrl + \ Techniques
Mouse drag • Mouse right click • Duplicate Session • Change Settings • Special Command Putty Techniques
setuid, setgid, sticky bit, environment varilables, signal, … Etc..